class ArtGun::OrderItemAttribute

Public Instance Methods

as_json(opts = {}) click to toggle source
Calls superclass method
# File lib/art_gun/order_item_attribute.rb, line 22
def as_json opts = {}
  hash = super opts
  hash.inject({}) do |h, (k,v)|
    h[k] = v unless v.nil?
    h
  end
end
attributes() click to toggle source
# File lib/art_gun/order_item_attribute.rb, line 18
def attributes
  self.class.attrs.inject({}){|h,k| h[k.to_s] = nil; h}
end