Sha256: 9eaba7bc7abf0e74975781b61c0e552324a4490d6fa356e615b6a552ccb2b3ae

Contents?: true

Size: 333 Bytes

Versions: 2

Compression:

Stored size: 333 Bytes

Contents

class Roulette::Transaction
  attr_accessor :args, :store, :method

  def initialize(options = {})
    self.store = options[:store]
    self.args = *options[:args]
    self.method = options[:method]
  end

  def fire(method_name = nil )
    method_to_fire = (method_name||method).to_sym
    store.send method_to_fire, *args
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
roulette-0.0.5 lib/roulette/transaction.rb
roulette-0.0.4 lib/roulette/transaction.rb