module ThreeScale::Core::APIClient::Attributes

Public Class Methods

included(base) click to toggle source
# File lib/3scale/core/api_client/attributes.rb, line 7
def self.included(base)
  base.extend ClassMethods
end

Public Instance Methods

attributes() click to toggle source
# File lib/3scale/core/api_client/attributes.rb, line 11
def attributes
  attrs = {}
  self.class.attributes.each do |attr|
    attrs[attr] = send(attr)
  end
  attrs
end
Also aliased as: to_hash
dirty?() click to toggle source
# File lib/3scale/core/api_client/attributes.rb, line 27
def dirty?
  @dirty
end
to_hash()
Alias for: attributes
update_attributes(attributes) click to toggle source
# File lib/3scale/core/api_client/attributes.rb, line 20
def update_attributes(attributes)
  self.class.attributes.each do |attr|
    send("#{attr}=", attributes[attr])
  end
  self
end

Private Instance Methods

dirty=(val) click to toggle source
# File lib/3scale/core/api_client/attributes.rb, line 33
def dirty=(val)
  @dirty = val
end