Sha256: b75dc24d7cdc15c9d110c06631f14dd75a8ca67e29431e3172839d8f89819faa
Contents?: true
Size: 728 Bytes
Versions: 1
Compression:
Stored size: 728 Bytes
Contents
module Reconn module Analyzer # Represents a method in the project class Method attr_reader :name, :class_name, :lines, :complexity, :filepath include Comparable def ==(other) name == other.name && class_name == other.class_name end 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 def to_s class_name.to_s + (is_singleton? ? "::" : "#") + name.to_s end def incr_complexity @complexity += 1 end def is_singleton? @is_singleton end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
reconn-1.0.0 | lib/reconn/analyzer/project_elements/method.rb |