Class: NeweggScraperChsbr::Price
- Inherits:
-
Object
- Object
- NeweggScraperChsbr::Price
- Defined in:
- lib/newegg_scraper_chsbr/price.rb
Instance Attribute Summary collapse
-
#price ⇒ Object
Returns the value of attribute price.
Instance Method Summary collapse
- #convert_price ⇒ Object
-
#initialize(price) ⇒ Price
constructor
A new instance of Price.
Constructor Details
#initialize(price) ⇒ Price
Returns a new instance of Price.
5 6 7 |
# File 'lib/newegg_scraper_chsbr/price.rb', line 5 def initialize(price) @price = price end |
Instance Attribute Details
#price ⇒ Object
Returns the value of attribute price.
3 4 5 |
# File 'lib/newegg_scraper_chsbr/price.rb', line 3 def price @price end |
Instance Method Details
#convert_price ⇒ Object
8 9 10 |
# File 'lib/newegg_scraper_chsbr/price.rb', line 8 def convert_price @price.slice(1 .. @price.size - 4).to_i end |