Module: RdioApi::Api
- Included in:
- Client
- Defined in:
- lib/rdio_api/api.rb
Instance Method Summary
collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method_sym, *arguments) ⇒ Object
8
9
10
11
12
13
14
15
16
|
# File 'lib/rdio_api/api.rb', line 8
def method_missing(method_sym, *arguments)
if UNAUTHENTICATED.include?(method_sym)
unauthenticated_request(method_sym, *arguments)
elsif AUTHENTICATED.include?(method_sym)
authenticated_request(method_sym, *arguments)
else
raise NoMethodError.new("Undefined method '#{method_sym}' for #{self}")
end
end
|
Instance Method Details
#respond_to?(method) ⇒ Boolean
18
19
20
|
# File 'lib/rdio_api/api.rb', line 18
def respond_to?(method)
AUTHENTICATED.include?(method.to_sym) || UNAUTHENTICATED.include?(method.to_sym) ? true : false
end
|