Module: Teamweek::Api::HashConstructed
Instance Attribute Summary collapse
-
#raw_data ⇒ Object
Returns the value of attribute raw_data.
Instance Method Summary collapse
-
#initialize(h) ⇒ Object
initalizes the object by pulling key-value pairs from the hash and mapping them to the object’s instance variables.
Instance Attribute Details
#raw_data ⇒ Object
Returns the value of attribute raw_data.
4 5 6 |
# File 'lib/teamweek/api/hash_constructed.rb', line 4 def raw_data @raw_data end |
Instance Method Details
#initialize(h) ⇒ Object
initalizes the object by pulling key-value pairs from the hash and mapping them to the object’s instance variables
9 10 11 12 |
# File 'lib/teamweek/api/hash_constructed.rb', line 9 def initialize(h) @raw_data = h h.each { |k,v| send("#{k}=",v) if respond_to?("#{k}=") } end |