class Commutator::Options::Proxy::Operation
Attributes
args[R]
block[R]
method[R]
Public Class Methods
new(method, args, block)
click to toggle source
# File lib/commutator/options/proxy.rb, line 17 def initialize(method, args, block) @method = method @args = args @block = block end
Public Instance Methods
apply(options, chainable_history = nil)
click to toggle source
# File lib/commutator/options/proxy.rb, line 23 def apply(options, chainable_history = nil) options.send(method, *args, &block).tap do |result| # if result == self then that was a call to #with_context chainable_history << self if chainable_history && result == options end end