Class: LiveAPI::Search::Result

Inherits:
Object
  • Object
show all
Defined in:
lib/live-search/result.rb

Instance Method Summary collapse

Constructor Details

#initialize(hash) ⇒ Result

Returns a new instance of Result.



4
5
6
# File 'lib/live-search/result.rb', line 4

def initialize(hash)
  @hash = hash
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name) ⇒ Object



8
9
10
# File 'lib/live-search/result.rb', line 8

def method_missing(name)
  @hash[camelize(name)]
end