Class: CbNitride::DiamondItem

Inherits:
Object
  • Object
show all
Defined in:
lib/cb_nitride/diamond_item.rb

Constant Summary collapse

SHORT_PAREN_OF_PATTERN =
/\s*[O][f][(]/

Instance Attribute Summary collapse

Instance Method Summary collapse

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(options = {})
  @state = options[:state]
  @raw_title = options[:title].sub(SHORT_PAREN_OF_PATTERN, ' (Of ')
  @diamond_number = options[:diamond_number]
  @stock_number = options[:stock_number]
  @image = options[:image]
  @image_url = options[:image_url]
  @publisher = options[:publisher]
  @creators = options[:creators]
  @description = options[:description]
  @release_date = options[:release_date]
  @price = options[:price]
  @category_code = options[:category_code]
  @errors = options[:errors]
end

Instance Attribute Details

#category_codeObject

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

#creatorsObject

Returns the value of attribute creators.



6
7
8
# File 'lib/cb_nitride/diamond_item.rb', line 6

def creators
  @creators
end

#descriptionObject

Returns the value of attribute description.



6
7
8
# File 'lib/cb_nitride/diamond_item.rb', line 6

def description
  @description
end

#diamond_numberObject

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

#errorsObject

Returns the value of attribute errors.



6
7
8
# File 'lib/cb_nitride/diamond_item.rb', line 6

def errors
  @errors
end

#imageObject

Returns the value of attribute image.



6
7
8
# File 'lib/cb_nitride/diamond_item.rb', line 6

def image
  @image
end

#image_urlObject

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

#priceObject

Returns the value of attribute price.



6
7
8
# File 'lib/cb_nitride/diamond_item.rb', line 6

def price
  @price
end

#publisherObject

Returns the value of attribute publisher.



6
7
8
# File 'lib/cb_nitride/diamond_item.rb', line 6

def publisher
  @publisher
end

#raw_titleObject

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_dateObject

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

#stateObject

Returns the value of attribute state.



6
7
8
# File 'lib/cb_nitride/diamond_item.rb', line 6

def state
  @state
end

#stock_numberObject

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