Class: Avmtrf1::Forponto::Parsers::Espelho

Inherits:
Aranha::Parsers::Html::Item
  • Object
show all
Defined in:
lib/avmtrf1/forponto/parsers/espelho.rb,
lib/avmtrf1/forponto/parsers/espelho/utils.rb,
lib/avmtrf1/forponto/parsers/espelho/day_node.rb,
lib/avmtrf1/forponto/parsers/espelho/row_node.rb,
lib/avmtrf1/forponto/parsers/espelho/sub_node.rb,
lib/avmtrf1/forponto/parsers/espelho/summary_node.rb,
lib/avmtrf1/forponto/parsers/espelho/rows_consumer.rb,
lib/avmtrf1/forponto/parsers/espelho/methods_as_fields.rb

Defined Under Namespace

Modules: MethodsAsFields Classes: DayNode, RowNode, RowsConsumer, SubNode, SummaryNode, Utils

Instance Method Summary collapse

Instance Method Details

#dataObject



16
17
18
19
20
21
22
# File 'lib/avmtrf1/forponto/parsers/espelho.rb', line 16

def data
  consumer = RowsConsumer.new
  item_node.xpath('./tbody/tr').map do |row_node|
    consumer.add_row(row_node)
  end
  consumer.data
end

#item_xpathObject



12
13
14
# File 'lib/avmtrf1/forponto/parsers/espelho.rb', line 12

def item_xpath
  '//table[@class="fiotabelaponto"]//table//table'
end