Class: AutoC::Module::Builder

Inherits:
Array
  • Object
show all
Defined in:
lib/autoc/module.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeBuilder

Returns a new instance of Builder.



31
32
33
34
# File 'lib/autoc/module.rb', line 31

def initialize
  @complexity = 0
  super
end

Instance Attribute Details

#complexityObject (readonly)

Returns the value of attribute complexity.



29
30
31
# File 'lib/autoc/module.rb', line 29

def complexity
  @complexity
end

Instance Method Details

#<<(obj) ⇒ Object



36
37
38
39
# File 'lib/autoc/module.rb', line 36

def <<(obj)
  @complexity += (s = obj.to_s).size
  super(s)
end