module AttributeHelper

Public Instance Methods

attributes() click to toggle source
# File lib/skiplan_client/attribute_helper.rb, line 8
def attributes
  Hash[instance_variables.map { |name| [name.to_s[1..-1].to_sym, instance_variable_get(name)] }]
end
attributes=(hash) click to toggle source
# File lib/skiplan_client/attribute_helper.rb, line 2
def attributes=(hash)
  hash.each do |key, value|
    instance_variable_set("@#{key}", value)
  end
end