Class: Exotel::Response
- Inherits:
-
Object
- Object
- Exotel::Response
- Defined in:
- lib/exotel-api-client/response.rb
Instance Attribute Summary collapse
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(hash) ⇒ Response
constructor
A new instance of Response.
Constructor Details
#initialize(hash) ⇒ Response
Returns a new instance of Response.
5 6 7 8 9 10 11 |
# File 'lib/exotel-api-client/response.rb', line 5 def initialize(hash) hash.each do |key,value| Response.new value if value.class == Hash self.instance_variable_set("@#{key}", value) self.class.send(:define_method, key, proc{self.instance_variable_get("@#{key}")}) end end |
Instance Attribute Details
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
3 4 5 |
# File 'lib/exotel-api-client/response.rb', line 3 def errors @errors end |