Class: Dmm::Item
Instance Attribute Summary collapse
-
#affiliateURL ⇒ Object
(also: #affiliate_url)
readonly
Returns the value of attribute affiliateURL.
-
#affiliateURLsp ⇒ Object
(also: #affiliate_url_sp)
readonly
Returns the value of attribute affiliateURLsp.
-
#category_name ⇒ Object
readonly
Returns the value of attribute category_name.
-
#content_id ⇒ Object
readonly
Returns the value of attribute content_id.
-
#date ⇒ Object
readonly
Returns the value of attribute date.
-
#floor_name ⇒ Object
readonly
Returns the value of attribute floor_name.
-
#imageURL ⇒ Object
(also: #image_url)
readonly
Returns the value of attribute imageURL.
-
#isbn ⇒ Object
readonly
Returns the value of attribute isbn.
-
#jancode ⇒ Object
readonly
Returns the value of attribute jancode.
-
#maker_product ⇒ Object
readonly
Returns the value of attribute maker_product.
-
#product_id ⇒ Object
readonly
Returns the value of attribute product_id.
-
#service_name ⇒ Object
readonly
Returns the value of attribute service_name.
-
#stock ⇒ Object
readonly
Returns the value of attribute stock.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
-
#URL ⇒ Object
(also: #url)
readonly
Returns the value of attribute URL.
-
#URLsp ⇒ Object
(also: #url_sp)
readonly
Returns the value of attribute URLsp.
Instance Method Summary collapse
-
#iteminfo ⇒ Dmm::Iteminfo
Returns a Dmm::Iteminfo object.
- #method_missing(method) ⇒ Object
-
#prices ⇒ Dmm::Price
Returns a Dmm::Price object.
- #respond_to?(method, include_private = false) ⇒ Boolean
- #respond_to_missing?(method, include_private = false) ⇒ Boolean
-
#sampleImageURL ⇒ Array<String>
(also: #sample_image_url)
Returns an Array of sampleimage url.
Methods inherited from Base
Constructor Details
This class inherits a constructor from Dmm::Base
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method) ⇒ Object
42 43 44 45 46 47 48 49 50 |
# File 'lib/dmm/item.rb', line 42 def method_missing(method) if iteminfo.respond_to? method.to_sym iteminfo.send(method.to_sym) elsif prices.respond_to? method.to_sym prices.send(method.to_sym) else super end end |
Instance Attribute Details
#affiliateURL ⇒ Object (readonly) Also known as: affiliate_url
Returns the value of attribute affiliateURL.
7 8 9 |
# File 'lib/dmm/item.rb', line 7 def affiliateURL @affiliateURL end |
#affiliateURLsp ⇒ Object (readonly) Also known as: affiliate_url_sp
Returns the value of attribute affiliateURLsp.
7 8 9 |
# File 'lib/dmm/item.rb', line 7 def affiliateURLsp @affiliateURLsp end |
#category_name ⇒ Object (readonly)
Returns the value of attribute category_name.
7 8 9 |
# File 'lib/dmm/item.rb', line 7 def category_name @category_name end |
#content_id ⇒ Object (readonly)
Returns the value of attribute content_id.
7 8 9 |
# File 'lib/dmm/item.rb', line 7 def content_id @content_id end |
#date ⇒ Object (readonly)
Returns the value of attribute date.
7 8 9 |
# File 'lib/dmm/item.rb', line 7 def date @date end |
#floor_name ⇒ Object (readonly)
Returns the value of attribute floor_name.
7 8 9 |
# File 'lib/dmm/item.rb', line 7 def floor_name @floor_name end |
#imageURL ⇒ Object (readonly) Also known as: image_url
Returns the value of attribute imageURL.
7 8 9 |
# File 'lib/dmm/item.rb', line 7 def imageURL @imageURL end |
#isbn ⇒ Object (readonly)
Returns the value of attribute isbn.
7 8 9 |
# File 'lib/dmm/item.rb', line 7 def isbn @isbn end |
#jancode ⇒ Object (readonly)
Returns the value of attribute jancode.
7 8 9 |
# File 'lib/dmm/item.rb', line 7 def jancode @jancode end |
#maker_product ⇒ Object (readonly)
Returns the value of attribute maker_product.
7 8 9 |
# File 'lib/dmm/item.rb', line 7 def maker_product @maker_product end |
#product_id ⇒ Object (readonly)
Returns the value of attribute product_id.
7 8 9 |
# File 'lib/dmm/item.rb', line 7 def product_id @product_id end |
#service_name ⇒ Object (readonly)
Returns the value of attribute service_name.
7 8 9 |
# File 'lib/dmm/item.rb', line 7 def service_name @service_name end |
#stock ⇒ Object (readonly)
Returns the value of attribute stock.
7 8 9 |
# File 'lib/dmm/item.rb', line 7 def stock @stock end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
7 8 9 |
# File 'lib/dmm/item.rb', line 7 def title @title end |
#URL ⇒ Object (readonly) Also known as: url
Returns the value of attribute URL.
7 8 9 |
# File 'lib/dmm/item.rb', line 7 def URL @URL end |
#URLsp ⇒ Object (readonly) Also known as: url_sp
Returns the value of attribute URLsp.
7 8 9 |
# File 'lib/dmm/item.rb', line 7 def URLsp @URLsp end |
Instance Method Details
#iteminfo ⇒ Dmm::Iteminfo
Returns a Dmm::Iteminfo object
37 38 39 40 |
# File 'lib/dmm/item.rb', line 37 def iteminfo @iteminfo ||= Dmm::Iteminfo.new(@attrs[:iteminfo]) @iteminfo end |
#prices ⇒ Dmm::Price
Returns a Dmm::Price object
29 30 31 32 |
# File 'lib/dmm/item.rb', line 29 def prices @price ||= Dmm::Price.new(@attrs[:prices]) @price end |
#respond_to?(method, include_private = false) ⇒ Boolean
53 |
# File 'lib/dmm/item.rb', line 53 def respond_to?(method, include_private = false); iteminfo.respond_to?(method.to_sym) || price.respond_to?(method.to_sym) || super; end |
#respond_to_missing?(method, include_private = false) ⇒ Boolean
52 |
# File 'lib/dmm/item.rb', line 52 def respond_to_missing?(method, include_private = false); iteminfo.respond_to?(method.to_sym) || price.respond_to?(method.to_sym) || super; end |
#sampleImageURL ⇒ Array<String> Also known as: sample_image_url
Returns an Array of sampleimage url
21 22 23 |
# File 'lib/dmm/item.rb', line 21 def sampleImageURL @attrs[:sampleImageURL][:sample_s][:image] end |