Class: Roulette::Transaction
- Inherits:
-
Object
- Object
- Roulette::Transaction
- Defined in:
- lib/roulette/transaction.rb
Instance Attribute Summary collapse
-
#args ⇒ Object
Returns the value of attribute args.
-
#method ⇒ Object
Returns the value of attribute method.
-
#store ⇒ Object
Returns the value of attribute store.
Instance Method Summary collapse
- #fire(method_name = nil) ⇒ Object
-
#initialize(options = {}) ⇒ Transaction
constructor
A new instance of Transaction.
Constructor Details
#initialize(options = {}) ⇒ Transaction
Returns a new instance of Transaction.
4 5 6 7 8 |
# File 'lib/roulette/transaction.rb', line 4 def initialize( = {}) self.store = [:store] self.args = *[:args] self.method = [:method] end |
Instance Attribute Details
#args ⇒ Object
Returns the value of attribute args.
2 3 4 |
# File 'lib/roulette/transaction.rb', line 2 def args @args end |
#method ⇒ Object
Returns the value of attribute method.
2 3 4 |
# File 'lib/roulette/transaction.rb', line 2 def method @method end |
#store ⇒ Object
Returns the value of attribute store.
2 3 4 |
# File 'lib/roulette/transaction.rb', line 2 def store @store end |
Instance Method Details
#fire(method_name = nil) ⇒ Object
10 11 12 13 |
# File 'lib/roulette/transaction.rb', line 10 def fire(method_name = nil ) method_to_fire = (method_name||method).to_sym store.send method_to_fire, *args end |