Class: Kayak::Search

Inherits:
Object
  • Object
show all
Defined in:
lib/kayak/search.rb

Direct Known Subclasses

FlightSearch

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attrs = {}) ⇒ Search

Returns a new instance of Search.



7
8
9
10
11
12
# File 'lib/kayak/search.rb', line 7

def initialize(attrs = {})
  # attrs.assert_valid_keys(self.valid_attributes.keys.map(&:to_s))
  @attributes = attrs.dup.with_indifferent_access
  @attributes.assert_valid_keys valid_attributes.keys
  validate!
end

Instance Attribute Details

#attributesObject (readonly)

Returns the value of attribute attributes.



5
6
7
# File 'lib/kayak/search.rb', line 5

def attributes
  @attributes
end