Class: Flight

Inherits:
Object
  • Object
show all
Defined in:
lib/teecket/flight.rb

Direct Known Subclasses

AirAsia, Firefly, MalaysiaAirlines, MalindoAir

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params) ⇒ Flight



8
9
10
11
12
13
14
# File 'lib/teecket/flight.rb', line 8

def initialize(params)
  @from  = params[:from]
  @to    = params[:to]
  @date  = params[:date]

  @fares = []
end

Instance Attribute Details

#dateObject (readonly)

Returns the value of attribute date.



6
7
8
# File 'lib/teecket/flight.rb', line 6

def date
  @date
end

#faresObject (readonly)

Returns the value of attribute fares.



6
7
8
# File 'lib/teecket/flight.rb', line 6

def fares
  @fares
end

#fromObject (readonly)

Returns the value of attribute from.



6
7
8
# File 'lib/teecket/flight.rb', line 6

def from
  @from
end

#toObject (readonly)

Returns the value of attribute to.



6
7
8
# File 'lib/teecket/flight.rb', line 6

def to
  @to
end