Class: Cobplexity::Paragraph
- Inherits:
-
Object
- Object
- Cobplexity::Paragraph
- Defined in:
- lib/cobplexity/paragraph.rb
Instance Attribute Summary (collapse)
-
- (Object) complexity
Returns the value of attribute complexity.
-
- (Object) lines
Returns the value of attribute lines.
-
- (Object) name
readonly
Returns the value of attribute name.
Instance Method Summary (collapse)
-
- (Paragraph) initialize(name)
constructor
A new instance of Paragraph.
Constructor Details
- (Paragraph) initialize(name)
A new instance of Paragraph
6 7 8 9 10 |
# File 'lib/cobplexity/paragraph.rb', line 6 def initialize name @name = name @lines = 0 @complexity = 1 end |
Instance Attribute Details
- (Object) complexity
Returns the value of attribute complexity
5 6 7 |
# File 'lib/cobplexity/paragraph.rb', line 5 def complexity @complexity end |
- (Object) lines
Returns the value of attribute lines
5 6 7 |
# File 'lib/cobplexity/paragraph.rb', line 5 def lines @lines end |
- (Object) name (readonly)
Returns the value of attribute name
4 5 6 |
# File 'lib/cobplexity/paragraph.rb', line 4 def name @name end |