Class: Cobplexity::Paragraph

Inherits:
Object
  • Object
show all
Defined in:
lib/cobplexity/paragraph.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#complexityObject

Returns the value of attribute complexity.



5
6
7
# File 'lib/cobplexity/paragraph.rb', line 5

def complexity
  @complexity
end

#linesObject

Returns the value of attribute lines.



5
6
7
# File 'lib/cobplexity/paragraph.rb', line 5

def lines
  @lines
end

#nameObject (readonly)

Returns the value of attribute name.



4
5
6
# File 'lib/cobplexity/paragraph.rb', line 4

def name
  @name
end