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

Returns a new instance of 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

Returns the value of attribute date.



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

def date
  @date
end

#faresObject

Returns the value of attribute fares.



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

def fares
  @fares
end

#fromObject

Returns the value of attribute from.



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

def from
  @from
end

#toObject

Returns the value of attribute to.



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

def to
  @to
end

Instance Method Details

#searchObject

Raises:

  • (NotImplementedError)


16
17
18
# File 'lib/teecket/flight.rb', line 16

def search
  raise NotImplementedError
end