Module: AspireBudget
- Defined in:
- lib/aspire_budget/utils.rb,
lib/aspire_budget/version.rb,
lib/aspire_budget/configuration.rb,
lib/aspire_budget/core_extensions.rb,
lib/aspire_budget/models/transaction.rb,
lib/aspire_budget/worksheets/backend_data.rb,
lib/aspire_budget/worksheets/transactions.rb,
lib/aspire_budget/models/category_transfer.rb,
lib/aspire_budget/worksheets/worksheet_base.rb,
lib/aspire_budget/worksheets/category_transfers.rb
Defined Under Namespace
Modules: CoreExtensions, Models, Utils, Worksheets Classes: Configuration
Constant Summary collapse
- VERSION =
Full release version.
'0.0.2'
Class Method Summary collapse
-
.configuration ⇒ AspireBudget::Configuration
The current configured defaults.
-
.configuration=(other) ⇒ Object
Overwrite the current configured defaults.
-
.configure {|configuration| ... } ⇒ Object
Configures default values.
-
.reset! ⇒ Object
Resets the set configuration.
Class Method Details
.configuration ⇒ AspireBudget::Configuration
Returns the current configured defaults.
10 11 12 |
# File 'lib/aspire_budget/configuration.rb', line 10 def self.configuration Thread.current[:aspire_budget_configuration] ||= Configuration.new end |
.configuration=(other) ⇒ Object
Overwrite the current configured defaults
16 17 18 |
# File 'lib/aspire_budget/configuration.rb', line 16 def self.configuration=(other) Thread.current[:aspire_budget_configuration] = other end |
.configure {|configuration| ... } ⇒ Object
Configures default values
5 6 7 |
# File 'lib/aspire_budget/configuration.rb', line 5 def self.configure yield(configuration) if block_given? end |
.reset! ⇒ Object
Resets the set configuration. Useful on e.g. testing
21 22 23 |
# File 'lib/aspire_budget/configuration.rb', line 21 def self.reset! Thread.current[:aspire_budget_configuration] = nil end |