Class: SimpleInvoice::Config
- Inherits:
-
Object
- Object
- SimpleInvoice::Config
- Extended by:
- Forwardable
- Defined in:
- lib/simple_invoice/config.rb
Class Method Summary collapse
Instance Method Summary collapse
- #[](key) ⇒ Object
- #[]=(key, value) ⇒ Object
-
#initialize ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
20 21 22 |
# File 'lib/simple_invoice/config.rb', line 20 def initialize @config_hash = {} end |
Class Method Details
.allocate_invoice_number(callable) ⇒ Object
14 15 16 |
# File 'lib/simple_invoice/config.rb', line 14 def allocate_invoice_number callable instance[:allocate_invoice_number] = callable end |
.instance ⇒ Object
8 9 10 |
# File 'lib/simple_invoice/config.rb', line 8 def instance @instance ||= new end |
Instance Method Details
#[](key) ⇒ Object
24 25 26 |
# File 'lib/simple_invoice/config.rb', line 24 def [](key) @config_hash[key] end |
#[]=(key, value) ⇒ Object
28 29 30 |
# File 'lib/simple_invoice/config.rb', line 28 def []=(key, value) @config_hash[key] = value end |