Class: Opera::MobileStore::ProductLocalization

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from InspectableAttributes

#inspect

Instance Attribute Details

#language_codeObject

All attributes are Read-Only…



12
13
14
# File 'lib/opera/mobile_store/product_localization.rb', line 12

def language_code
  @language_code
end

#long_descriptionObject

All attributes are Read-Only…



12
13
14
# File 'lib/opera/mobile_store/product_localization.rb', line 12

def long_description
  @long_description
end

#short_descriptionObject

All attributes are Read-Only…



12
13
14
# File 'lib/opera/mobile_store/product_localization.rb', line 12

def short_description
  @short_description
end

#titleObject

All attributes are Read-Only…



12
13
14
# File 'lib/opera/mobile_store/product_localization.rb', line 12

def title
  @title
end

Instance Method Details

#attributesObject



17
18
19
20
21
22
23
24
25
# File 'lib/opera/mobile_store/product_localization.rb', line 17

def attributes
  [
    :language_code, :title, :short_description, :long_description
  ].inject({}) do |hash, field_name|
    field_value = self.public_send field_name
    hash[field_name.to_s] = field_value if field_value.present?
    hash
  end
end