class Reconn::Analyzer::Method
Represents a method in the project
Attributes
class_name[R]
complexity[R]
filepath[R]
lines[R]
name[R]
Public Class Methods
new(name, filepath = "", class_name = :none, lines = 0, is_singleton = false)
click to toggle source
# File lib/reconn/analyzer/project_elements/method.rb, line 13 def initialize(name, filepath = "", class_name = :none, lines = 0, is_singleton = false) @name = name @filepath = filepath @class_name = class_name @lines = lines @complexity = 1 @is_singleton = is_singleton end
Public Instance Methods
==(other)
click to toggle source
# File lib/reconn/analyzer/project_elements/method.rb, line 9 def ==(other) name == other.name && class_name == other.class_name end
incr_complexity()
click to toggle source
# File lib/reconn/analyzer/project_elements/method.rb, line 26 def incr_complexity @complexity += 1 end
is_singleton?()
click to toggle source
# File lib/reconn/analyzer/project_elements/method.rb, line 30 def is_singleton? @is_singleton end
to_s()
click to toggle source
# File lib/reconn/analyzer/project_elements/method.rb, line 22 def to_s class_name.to_s + (is_singleton? ? "::" : "#") + name.to_s end