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.
12 13 14 15 16 |
# File 'lib/basic101/line.rb', line 12 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.
9 10 11 |
# File 'lib/basic101/line.rb', line 9 def line_number @line_number end |
#statements ⇒ Object (readonly)
Returns the value of attribute statements.
10 11 12 |
# File 'lib/basic101/line.rb', line 10 def statements @statements end |