Class: Run

Inherits:
Object
  • Object
show all
Defined in:
lib/model/run.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(run) ⇒ Run

Returns a new instance of Run.



7
8
9
10
11
12
# File 'lib/model/run.rb', line 7

def initialize run
  @transport_type =  TransportType.from_s run.delete("transport_type")
  run.each do |k,v|
    instance_variable_set("@#{k}", v) unless v.nil?
  end
end

Instance Attribute Details

#destination_idObject (readonly)

Returns the value of attribute destination_id.



5
6
7
# File 'lib/model/run.rb', line 5

def destination_id
  @destination_id
end

#destination_nameObject (readonly)

Returns the value of attribute destination_name.



5
6
7
# File 'lib/model/run.rb', line 5

def destination_name
  @destination_name
end

#run_idObject (readonly)

Returns the value of attribute run_id.



5
6
7
# File 'lib/model/run.rb', line 5

def run_id
  @run_id
end

#transport_typeObject (readonly)

Returns the value of attribute transport_type.



5
6
7
# File 'lib/model/run.rb', line 5

def transport_type
  @transport_type
end