module Teamweek::Api::HashConstructed
Attributes
raw_data[RW]
Public Class Methods
new(h)
click to toggle source
initalizes the object by pulling key-value pairs from the hash and mapping them to the object's instance variables
@param [Hash] h hash containing key-value pairs to map to object instance variables
# 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