Class: Response
- Inherits:
-
Object
- Object
- Response
- Defined in:
- lib/mslm/response.rb
Instance Attribute Summary collapse
-
#all ⇒ Object
readonly
Returns the value of attribute all.
Instance Method Summary collapse
-
#initialize(response) ⇒ Response
constructor
A new instance of Response.
Constructor Details
#initialize(response) ⇒ Response
Returns a new instance of Response.
4 5 6 7 8 9 10 11 12 13 |
# File 'lib/mslm/response.rb', line 4 def initialize(response) @all = response @all.each do |name, value| instance_variable_set("@#{name}", value) c = class << self; self end c.send(:attr_accessor, name) end end |
Instance Attribute Details
#all ⇒ Object (readonly)
Returns the value of attribute all.
2 3 4 |
# File 'lib/mslm/response.rb', line 2 def all @all end |