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