Class: Flight
- Inherits:
-
Object
- Object
- Flight
- Defined in:
- lib/teecket/flight.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#date ⇒ Object
Returns the value of attribute date.
-
#fares ⇒ Object
Returns the value of attribute fares.
-
#from ⇒ Object
Returns the value of attribute from.
-
#to ⇒ Object
Returns the value of attribute to.
Instance Method Summary collapse
-
#initialize(params) ⇒ Flight
constructor
A new instance of Flight.
- #search ⇒ Object
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
#date ⇒ Object
Returns the value of attribute date.
6 7 8 |
# File 'lib/teecket/flight.rb', line 6 def date @date end |
#fares ⇒ Object
Returns the value of attribute fares.
6 7 8 |
# File 'lib/teecket/flight.rb', line 6 def fares @fares end |
#from ⇒ Object
Returns the value of attribute from.
6 7 8 |
# File 'lib/teecket/flight.rb', line 6 def from @from end |
#to ⇒ Object
Returns the value of attribute to.
6 7 8 |
# File 'lib/teecket/flight.rb', line 6 def to @to end |
Instance Method Details
#search ⇒ Object
16 17 18 |
# File 'lib/teecket/flight.rb', line 16 def search raise NotImplementedError end |