Class: RockBooks::BsIsSectionData

Inherits:
Struct
  • Object
show all
Defined in:
lib/rock_books/reports/data/bs_is_section_data.rb,
lib/rock_books/reports/data/bs_is_section_data.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#contextObject

Returns the value of attribute context

Returns:

  • (Object)

    the current value of context



3
4
5
# File 'lib/rock_books/reports/data/bs_is_section_data.rb', line 3

def context
  @context
end

#journals_acct_totalsObject

Returns the value of attribute journals_acct_totals

Returns:

  • (Object)

    the current value of journals_acct_totals



3
4
5
# File 'lib/rock_books/reports/data/bs_is_section_data.rb', line 3

def journals_acct_totals
  @journals_acct_totals
end

#typeObject

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



3
4
5
# File 'lib/rock_books/reports/data/bs_is_section_data.rb', line 3

def type
  @type
end

Instance Method Details

#fetchObject



6
7
8
9
10
11
# File 'lib/rock_books/reports/data/bs_is_section_data.rb', line 6

def fetch
  {
    acct_totals: totals,
    total: totals.map(&:last).sum.round(2)
  }
end