Class: Egg::TransactionParser

Inherits:
Object
  • Object
show all
Defined in:
lib/egg/parsers/transaction_parser.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(row) ⇒ TransactionParser

Returns a new instance of TransactionParser.



7
8
9
# File 'lib/egg/parsers/transaction_parser.rb', line 7

def initialize(row)
  @row = row
end

Instance Attribute Details

#rowObject (readonly)

Returns the value of attribute row.



5
6
7
# File 'lib/egg/parsers/transaction_parser.rb', line 5

def row
  @row
end

Instance Method Details

#dateObject



19
20
21
# File 'lib/egg/parsers/transaction_parser.rb', line 19

def date
  (row/"td.date").inner_text
end

#descriptionObject



23
24
25
# File 'lib/egg/parsers/transaction_parser.rb', line 23

def description
  (row/"td.description").inner_text
end

#moneyObject



15
16
17
# File 'lib/egg/parsers/transaction_parser.rb', line 15

def money
  (row/"td.money").inner_text.sub(/^\?/, '').sub(//, '')
end

#skip?Boolean

Returns:

  • (Boolean)


11
12
13
# File 'lib/egg/parsers/transaction_parser.rb', line 11

def skip?
  false
end