Class: AMarmita::Orders::Scrapper

Inherits:
Scrapper
  • Object
show all
Defined in:
lib/a_marmita/orders/scrapper.rb

Instance Attribute Summary

Attributes inherited from Scrapper

#attributes, #css_parser

Instance Method Summary collapse

Methods inherited from Scrapper

#initialize, #scrap, #to_hash, #valid?

Constructor Details

This class inherits a constructor from AMarmita::Scrapper

Instance Method Details

#run(options = {}) ⇒ Object



11
12
13
14
15
16
17
18
19
20
21
# File 'lib/a_marmita/orders/scrapper.rb', line 11

def run(options = {})
  @attributes = {
    name: get_name,
    id: Helpers.to_int(get_id),
    order_date: get_order_date,
    line: Helpers.to_int(get_line),
    delivery_date: get_delivery_date,
    price: Helpers.to_float(get_price),
    quantity: Helpers.to_int(get_quantity)
  }
end