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