Class: HledgerForecast::Settings

Inherits:
Object
  • Object
show all
Defined in:
lib/hledger_forecast/settings.rb

Constant Summary collapse

DEFAULTS =
{
  currency: "USD",
  show_symbol: true,
  sign_before_symbol: false,
  thousands_separator: ","
}.freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#currencyObject (readonly)

Returns the value of attribute currency.



10
11
12
# File 'lib/hledger_forecast/settings.rb', line 10

def currency
  @currency
end

#roll_upObject (readonly)

Returns the value of attribute roll_up.



10
11
12
# File 'lib/hledger_forecast/settings.rb', line 10

def roll_up
  @roll_up
end

#show_symbolObject (readonly)

Returns the value of attribute show_symbol.



10
11
12
# File 'lib/hledger_forecast/settings.rb', line 10

def show_symbol
  @show_symbol
end

#sign_before_symbolObject (readonly)

Returns the value of attribute sign_before_symbol.



10
11
12
# File 'lib/hledger_forecast/settings.rb', line 10

def sign_before_symbol
  @sign_before_symbol
end

#thousands_separatorObject (readonly)

Returns the value of attribute thousands_separator.



10
11
12
# File 'lib/hledger_forecast/settings.rb', line 10

def thousands_separator
  @thousands_separator
end

#verboseObject (readonly)

Returns the value of attribute verbose.



10
11
12
# File 'lib/hledger_forecast/settings.rb', line 10

def verbose
  @verbose
end

Class Method Details

.parse(settings_rows, cli_options = nil) ⇒ Object



19
20
21
# File 'lib/hledger_forecast/settings.rb', line 19

def self.parse(settings_rows, cli_options = nil)
  new(settings_rows, cli_options)
end

Instance Method Details

#verbose?Boolean

Returns:

  • (Boolean)


23
# File 'lib/hledger_forecast/settings.rb', line 23

def verbose? = @verbose