Class: Line
- Inherits:
-
Object
- Object
- Line
- Defined in:
- lib/model/line.rb
Instance Attribute Summary collapse
-
#line_id ⇒ Object
readonly
Returns the value of attribute line_id.
-
#line_name ⇒ Object
readonly
Returns the value of attribute line_name.
-
#line_number ⇒ Object
readonly
Returns the value of attribute line_number.
-
#transport_type ⇒ Object
readonly
Returns the value of attribute transport_type.
Instance Method Summary collapse
-
#initialize(args) ⇒ Line
constructor
A new instance of Line.
Constructor Details
#initialize(args) ⇒ Line
Returns a new instance of Line.
7 8 9 10 11 12 |
# File 'lib/model/line.rb', line 7 def initialize args @transport_type = TransportType.from_s args.delete("transport_type") args.each do |k,v| instance_variable_set("@#{k}", v) unless v.nil? end end |
Instance Attribute Details
#line_id ⇒ Object (readonly)
Returns the value of attribute line_id.
5 6 7 |
# File 'lib/model/line.rb', line 5 def line_id @line_id end |
#line_name ⇒ Object (readonly)
Returns the value of attribute line_name.
5 6 7 |
# File 'lib/model/line.rb', line 5 def line_name @line_name end |
#line_number ⇒ Object (readonly)
Returns the value of attribute line_number.
5 6 7 |
# File 'lib/model/line.rb', line 5 def line_number @line_number end |
#transport_type ⇒ Object (readonly)
Returns the value of attribute transport_type.
5 6 7 |
# File 'lib/model/line.rb', line 5 def transport_type @transport_type end |