Class: Basic101::Line
Instance Attribute Summary collapse
-
#line_number ⇒ Object
readonly
Returns the value of attribute line_number.
-
#statements ⇒ Object
readonly
Returns the value of attribute statements.
Instance Method Summary collapse
-
#initialize(line_number, statements) ⇒ Line
constructor
A new instance of Line.
Methods included from Identity
Constructor Details
#initialize(line_number, statements) ⇒ Line
Returns a new instance of Line.
10 11 12 13 14 |
# File 'lib/basic101/line.rb', line 10 def initialize(line_number, statements) @line_number = line_number.to_i @statements = statements link_statements_to_line end |
Instance Attribute Details
#line_number ⇒ Object (readonly)
Returns the value of attribute line_number.
7 8 9 |
# File 'lib/basic101/line.rb', line 7 def line_number @line_number end |
#statements ⇒ Object (readonly)
Returns the value of attribute statements.
8 9 10 |
# File 'lib/basic101/line.rb', line 8 def statements @statements end |