Class: Opera::MobileStore::Category

Inherits:
Object
  • Object
show all
Includes:
ActiveModel::Model, ActiveModel::Serialization, InspectableAttributes, Opera::MobileStoreSDK::IdentityMapable
Defined in:
lib/opera/mobile_store/category.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Opera::MobileStoreSDK::IdentityMapable

#initialize

Methods included from InspectableAttributes

#inspect

Instance Attribute Details

#codeObject

All attributes are Read-Only…



14
15
16
# File 'lib/opera/mobile_store/category.rb', line 14

def code
  @code
end

#idObject

All attributes are Read-Only…



14
15
16
# File 'lib/opera/mobile_store/category.rb', line 14

def id
  @id
end

#nameObject

All attributes are Read-Only…



14
15
16
# File 'lib/opera/mobile_store/category.rb', line 14

def name
  @name
end

Instance Method Details

#attributesObject



16
17
18
19
20
21
22
# File 'lib/opera/mobile_store/category.rb', line 16

def attributes
  [:id, :code, :name].inject({}) do |hash, field_name|
    field_value = self.public_send field_name
    hash[field_name.to_s] = field_value unless field_value.nil?
    hash
  end
end