class CptHook::DSL::MethodCall
Attributes
contexts[R]
method[R]
withs[R]
Public Class Methods
new(method_to_call)
click to toggle source
# File lib/cpt_hook/dsl/method_call.rb, line 6 def initialize(method_to_call) @method = method_to_call @contexts = [] @withs = [] end
Public Instance Methods
clone(other)
click to toggle source
# File lib/cpt_hook/dsl/method_call.rb, line 28 def clone(other) @withs = other.withs.dup @contexts = other.contexts.dup self end
dup()
click to toggle source
# File lib/cpt_hook/dsl/method_call.rb, line 34 def dup MethodCall.new(@method).clone(self) end
resolve_contexts(&block)
click to toggle source
# File lib/cpt_hook/dsl/method_call.rb, line 16 def resolve_contexts(&block) @contexts.map!(&block) end
resolve_with(&block)
click to toggle source
# File lib/cpt_hook/dsl/method_call.rb, line 12 def resolve_with(&block) @withs.map!(&block) end
using(*args)
click to toggle source
# File lib/cpt_hook/dsl/method_call.rb, line 24 def using(*args) @contexts = args end
with(*args)
click to toggle source
# File lib/cpt_hook/dsl/method_call.rb, line 20 def with(*args) @withs = args end