Class: AutoC::Module::Builder
- Inherits:
-
Array
- Object
- Array
- AutoC::Module::Builder
- Defined in:
- lib/autoc/module.rb
Instance Attribute Summary collapse
-
#complexity ⇒ Object
readonly
Returns the value of attribute complexity.
Instance Method Summary collapse
- #<<(obj) ⇒ Object
-
#initialize ⇒ Builder
constructor
A new instance of Builder.
Constructor Details
#initialize ⇒ Builder
Returns a new instance of Builder.
32 33 34 35 |
# File 'lib/autoc/module.rb', line 32 def initialize @complexity = 0 super end |
Instance Attribute Details
#complexity ⇒ Object (readonly)
Returns the value of attribute complexity.
30 31 32 |
# File 'lib/autoc/module.rb', line 30 def complexity @complexity end |
Instance Method Details
#<<(obj) ⇒ Object
37 38 39 40 |
# File 'lib/autoc/module.rb', line 37 def <<(obj) @complexity += (s = obj.to_s).size super(s) end |