Method: ClassyPlivo::Response#method_missing
- Defined in:
- lib/classy_plivo/response.rb
#method_missing(method, *args, &block) ⇒ Object
Delegate all other method calls to the payload hash
23 24 25 26 27 28 29 30 31 |
# File 'lib/classy_plivo/response.rb', line 23 def method_missing(method, *args, &block) payload_key = method.to_s if has_payload_key?(payload_key) payload[payload_key] else fail NoPayloadKeyError, "Key '#{payload_key}' not found in response payload: #{payload}" end end |