class Take::Project::Actionable
Handles actions that might be taken from within a build action; used in {Convert}s and {Target}s.
Attributes
data[R]
Public Class Methods
new(&blk)
click to toggle source
# File lib/take/project/actionable.rb, line 10 def initialize(&blk) @data = {} @block = blk end
Public Instance Methods
call(project, data = {})
click to toggle source
# File lib/take/project/actionable.rb, line 20 def call(project, data = {}) @data = data.merge( :curdir => project.path, :env => project.env) instance_exec(@block) end
method_missing(method, *args, &block)
click to toggle source
Calls superclass method
# File lib/take/project/actionable.rb, line 27 def method_missing(method, *args, &block) if @data.key?(method) && args.size == 0 && !block_given? @data[method] else super end end
respond_to_missing?(method, _)
click to toggle source
# File lib/take/project/actionable.rb, line 35 def respond_to_missing?(method, _) @data.key?(method) end
run(command, arguments)
click to toggle source
# File lib/take/project/actionable.rb, line 15 def run(command, arguments) runner = Command::Runner.new(command, arguments) runner.pass! end