Class: Doshii::Response
- Inherits:
-
Hash
- Object
- Hash
- Doshii::Response
show all
- Includes:
- Hashie::Extensions::MethodAccess
- Defined in:
- lib/doshii/response.rb
Instance Method Summary
collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args, &block) ⇒ Object
7
8
9
10
11
12
|
# File 'lib/doshii/response.rb', line 7
def method_missing(name, *args, &block)
value = super
return value.collect { |v| Doshii::Response[v] } if value.is_a? Array
return Response[value] if value.is_a? Hash
value
end
|