class Build::RuleNode

Attributes

arguments[R]
callback[R]
rule[R]

Public Class Methods

new(rule, arguments, &block) click to toggle source
Calls superclass method
# File lib/build/rule_node.rb, line 25
def initialize(rule, arguments, &block)
        @arguments = arguments
        @rule = rule
        
        @callback = block
        
        inputs, outputs = @rule.files(@arguments)
        
        super(inputs, outputs)
end

Public Instance Methods

==(other) click to toggle source
Calls superclass method
# File lib/build/rule_node.rb, line 40
def == other
        super and
                @arguments == other.arguments and
                @rule == other.rule and
                @callback == other.callback
end
apply!(scope) click to toggle source
# File lib/build/rule_node.rb, line 59
def apply!(scope)
        @rule.apply!(scope, @arguments)
        
        if @callback
                scope.instance_exec(@arguments, &@callback)
        end
end
hash() click to toggle source
Calls superclass method
# File lib/build/rule_node.rb, line 47
def hash
        super ^ @arguments.hash ^ @rule.hash ^ @callback.hash
end
inspect() click to toggle source
# File lib/build/rule_node.rb, line 67
def inspect
        @rule.name.inspect
end
name() click to toggle source
# File lib/build/rule_node.rb, line 55
def name
        @rule.name
end
task_class(parent_task) click to toggle source
# File lib/build/rule_node.rb, line 51
def task_class(parent_task)
        parent_task.class
end