Class: Subledger::Interface::Client
- Inherits:
-
Object
- Object
- Subledger::Interface::Client
- Defined in:
- lib/subledger/interface/client.rb
Instance Attribute Summary collapse
-
#store ⇒ Object
readonly
Returns the value of attribute store.
Instance Method Summary collapse
- #balance(*args) ⇒ Object
- #credit(*args) ⇒ Object
- #debit(*args) ⇒ Object
-
#initialize(args) ⇒ Client
constructor
A new instance of Client.
- #zero(*args) ⇒ Object
Constructor Details
#initialize(args) ⇒ Client
Returns a new instance of Client.
245 246 247 248 249 250 251 |
# File 'lib/subledger/interface/client.rb', line 245 def initialize args @client_args = args # TODO client should not have @store and #store @store = args[:store] end |
Instance Attribute Details
#store ⇒ Object (readonly)
Returns the value of attribute store.
243 244 245 |
# File 'lib/subledger/interface/client.rb', line 243 def store @store end |
Instance Method Details
#balance(*args) ⇒ Object
290 291 292 |
# File 'lib/subledger/interface/client.rb', line 290 def balance *args Domain::Balance.new *args end |
#credit(*args) ⇒ Object
282 283 284 |
# File 'lib/subledger/interface/client.rb', line 282 def credit *args args.empty? ? Domain::Credit : Domain::Credit.new( *args ) end |