Class: RockBooks::JournalEntryContext

Inherits:
Struct
  • Object
show all
Defined in:
lib/rock_books/types/journal_entry_context.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#journalObject

Returns the value of attribute journal

Returns:

  • (Object)

    the current value of journal



3
4
5
# File 'lib/rock_books/types/journal_entry_context.rb', line 3

def journal
  @journal
end

#lineObject

Returns the value of attribute line

Returns:

  • (Object)

    the current value of line



3
4
5
# File 'lib/rock_books/types/journal_entry_context.rb', line 3

def line
  @line
end

#linenumObject

Returns the value of attribute linenum

Returns:

  • (Object)

    the current value of linenum



3
4
5
# File 'lib/rock_books/types/journal_entry_context.rb', line 3

def linenum
  @linenum
end

Instance Method Details

#chart_of_accountsObject



5
6
7
# File 'lib/rock_books/types/journal_entry_context.rb', line 5

def chart_of_accounts
  journal.chart_of_accounts
end

#to_sObject



9
10
11
# File 'lib/rock_books/types/journal_entry_context.rb', line 9

def to_s
  "Journal '#{journal.short_name}', line ##{linenum}, text: #{line}"
end