Class: CbNitride::DiamondItem
- Inherits:
-
Object
- Object
- CbNitride::DiamondItem
- Defined in:
- lib/cb_nitride/diamond_item.rb
Constant Summary collapse
- SHORT_PAREN_OF_PATTERN =
/\s*[O][f][(]/
Instance Attribute Summary collapse
-
#category_code ⇒ Object
Returns the value of attribute category_code.
-
#creators ⇒ Object
Returns the value of attribute creators.
-
#description ⇒ Object
Returns the value of attribute description.
-
#diamond_number ⇒ Object
Returns the value of attribute diamond_number.
-
#errors ⇒ Object
Returns the value of attribute errors.
-
#image ⇒ Object
Returns the value of attribute image.
-
#image_url ⇒ Object
Returns the value of attribute image_url.
-
#price ⇒ Object
Returns the value of attribute price.
-
#publisher ⇒ Object
Returns the value of attribute publisher.
-
#raw_title ⇒ Object
Returns the value of attribute raw_title.
-
#release_date ⇒ Object
Returns the value of attribute release_date.
-
#state ⇒ Object
Returns the value of attribute state.
-
#stock_number ⇒ Object
Returns the value of attribute stock_number.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ DiamondItem
constructor
A new instance of DiamondItem.
Constructor Details
#initialize(options = {}) ⇒ DiamondItem
Returns a new instance of DiamondItem.
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/cb_nitride/diamond_item.rb', line 8 def initialize( = {}) @state = [:state] @raw_title = [:title].sub(SHORT_PAREN_OF_PATTERN, ' (Of ') @diamond_number = [:diamond_number] @stock_number = [:stock_number] @image = [:image] @image_url = [:image_url] @publisher = [:publisher] @creators = [:creators] @description = [:description] @release_date = [:release_date] @price = [:price] @category_code = [:category_code] @errors = [:errors] end |
Instance Attribute Details
#category_code ⇒ Object
Returns the value of attribute category_code.
6 7 8 |
# File 'lib/cb_nitride/diamond_item.rb', line 6 def category_code @category_code end |
#creators ⇒ Object
Returns the value of attribute creators.
6 7 8 |
# File 'lib/cb_nitride/diamond_item.rb', line 6 def creators @creators end |
#description ⇒ Object
Returns the value of attribute description.
6 7 8 |
# File 'lib/cb_nitride/diamond_item.rb', line 6 def description @description end |
#diamond_number ⇒ Object
Returns the value of attribute diamond_number.
6 7 8 |
# File 'lib/cb_nitride/diamond_item.rb', line 6 def diamond_number @diamond_number end |
#errors ⇒ Object
Returns the value of attribute errors.
6 7 8 |
# File 'lib/cb_nitride/diamond_item.rb', line 6 def errors @errors end |
#image ⇒ Object
Returns the value of attribute image.
6 7 8 |
# File 'lib/cb_nitride/diamond_item.rb', line 6 def image @image end |
#image_url ⇒ Object
Returns the value of attribute image_url.
6 7 8 |
# File 'lib/cb_nitride/diamond_item.rb', line 6 def image_url @image_url end |
#price ⇒ Object
Returns the value of attribute price.
6 7 8 |
# File 'lib/cb_nitride/diamond_item.rb', line 6 def price @price end |
#publisher ⇒ Object
Returns the value of attribute publisher.
6 7 8 |
# File 'lib/cb_nitride/diamond_item.rb', line 6 def publisher @publisher end |
#raw_title ⇒ Object
Returns the value of attribute raw_title.
6 7 8 |
# File 'lib/cb_nitride/diamond_item.rb', line 6 def raw_title @raw_title end |
#release_date ⇒ Object
Returns the value of attribute release_date.
6 7 8 |
# File 'lib/cb_nitride/diamond_item.rb', line 6 def release_date @release_date end |
#state ⇒ Object
Returns the value of attribute state.
6 7 8 |
# File 'lib/cb_nitride/diamond_item.rb', line 6 def state @state end |
#stock_number ⇒ Object
Returns the value of attribute stock_number.
6 7 8 |
# File 'lib/cb_nitride/diamond_item.rb', line 6 def stock_number @stock_number end |