class Tributa::Table::Row

Attributes

canton[R]
canton_rate[R]
catholic_rate[R]
community[R]
community_rate[R]
reformed_rate[R]
year[R]

Public Class Methods

new(columns = []) click to toggle source
# File lib/tributa/table/row.rb, line 7
def initialize(columns = [])
  @canton,
  @year,
  @community,
  @canton_rate,
  @community_rate,
  @reformed_rate,
  @catholic_rate = columns
end

Public Instance Methods

as_json() click to toggle source
# File lib/tributa/table/row.rb, line 17
def as_json
  {
    canton: canton,
    year: year,
    community: community,
    canton_rate: canton_rate,
    community_rate: community_rate,
    reformed_rate: reformed_rate,
    catholic_rate: catholic_rate
  }
end
to_json() click to toggle source
# File lib/tributa/table/row.rb, line 29
def to_json
  as_json.to_json
end