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

Inherits:
SubNode
  • Object
show all
Defined in:
lib/avmtrf1/forponto/parsers/espelho/row_node.rb

Instance Attribute Summary

Attributes inherited from SubNode

#node

Instance Method Summary collapse

Methods inherited from SubNode

#initialize

Constructor Details

This class inherits a constructor from Avmtrf1::Forponto::Parsers::Espelho::SubNode

Instance Method Details

#css_classObject



14
15
16
# File 'lib/avmtrf1/forponto/parsers/espelho/row_node.rb', line 14

def css_class
  node['class']
end

#day?Boolean

Returns:

  • (Boolean)


18
19
20
# File 'lib/avmtrf1/forponto/parsers/espelho/row_node.rb', line 18

def day?
  css_class == 'celulatabptomarc'
end

#days_area_end?Boolean

Returns:

  • (Boolean)


26
27
28
29
# File 'lib/avmtrf1/forponto/parsers/espelho/row_node.rb', line 26

def days_area_end?
  font = node.at_xpath('.//font[@class="fontetopotabelaponto"]')
  font && font.text.to_s.include?('Total das Ocorr')
end

#empty?Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/avmtrf1/forponto/parsers/espelho/row_node.rb', line 10

def empty?
  Utils.string_recursive(node).blank?
end

#summary?Boolean

Returns:

  • (Boolean)


22
23
24
# File 'lib/avmtrf1/forponto/parsers/espelho/row_node.rb', line 22

def summary?
  css_class == 'celulatabptodados'
end