Class: Joyent::Cloud::Pricing::Scraper::Parser
- Inherits:
-
Struct
- Object
- Struct
- Joyent::Cloud::Pricing::Scraper::Parser
- Defined in:
- lib/pricing/scraper.rb
Instance Attribute Summary collapse
-
#doc ⇒ Object
Returns the value of attribute doc.
Instance Method Summary collapse
Instance Attribute Details
#doc ⇒ Object
Returns the value of attribute doc
14 15 16 |
# File 'lib/pricing/scraper.rb', line 14 def doc @doc end |
Instance Method Details
#result ⇒ Object
16 17 18 19 20 21 22 23 24 25 |
# File 'lib/pricing/scraper.rb', line 16 def result config = Hash.new self.doc.css('ul.full-specs').each do |ul| flavor = extract_price(ul) next if flavor.cost.nil? next if flavor.name =~ /kvm/ && flavor.os !~ /linux/i config[flavor.name]= flavor.to_h end config end |