Module: Newegg::Explorer
- Included in:
- Newegg
- Defined in:
- lib/newegg/explorer.rb
Instance Method Summary
collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args, &block) ⇒ Object
9
10
11
12
|
# File 'lib/newegg/explorer.rb', line 9
def method_missing(method, *args, &block)
return self.api.send(method) if args.empty?
self.api.send(method, *args)
end
|
Instance Method Details
#api ⇒ Object
5
6
7
|
# File 'lib/newegg/explorer.rb', line 5
def api
@api ||= Api.new
end
|
#respond_to?(method) ⇒ Boolean
14
15
16
17
|
# File 'lib/newegg/explorer.rb', line 14
def respond_to?(method)
return true if (self.methods.include?(method) || self.instance_methods.include?(method))
false
end
|