Class: Inprovise::Fork::DSL
- Inherits:
-
Object
- Object
- Inprovise::Fork::DSL
show all
- Defined in:
- lib/inprovise/fork/fork.rb
Instance Method Summary
collapse
Constructor Details
#initialize(context, mode) ⇒ DSL
Returns a new instance of DSL.
20
21
22
23
|
# File 'lib/inprovise/fork/fork.rb', line 20
def initialize(context, mode)
@context = context
@async = mode == :async
end
|
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(meth, *args) ⇒ Object
52
53
54
|
# File 'lib/inprovise/fork/fork.rb', line 52
def method_missing(meth, *args)
@context.config.send(meth, *args)
end
|
Instance Method Details
#apply(script, *args) ⇒ Object
56
57
58
|
# File 'lib/inprovise/fork/fork.rb', line 56
def apply(script, *args)
run_command(:apply, script, *args)
end
|
#config ⇒ Object
48
49
50
|
# File 'lib/inprovise/fork/fork.rb', line 48
def config
@context.config
end
|
#revert(script, *args) ⇒ Object
60
61
62
|
# File 'lib/inprovise/fork/fork.rb', line 60
def revert(script, *args)
run_command(:revert, script, *args)
end
|
#trigger(action, *args) ⇒ Object
68
69
70
|
# File 'lib/inprovise/fork/fork.rb', line 68
def trigger(action, *args)
run_command(:trigger, action, *args)
end
|
#validate(script, *args) ⇒ Object
64
65
66
|
# File 'lib/inprovise/fork/fork.rb', line 64
def validate(script, *args)
run_command(:validate, script, *args)
end
|