Class: Spud::BuildTools::SpudBuild::Rule
- Defined in:
- lib/build_tools/spud/rule.rb
Instance Method Summary collapse
-
#initialize(spud, file_context, name, deps = {}, &block) ⇒ Rule
constructor
A new instance of Rule.
- #invoke(*args, **kwargs) ⇒ Object
Constructor Details
#initialize(spud, file_context, name, deps = {}, &block) ⇒ Rule
Returns a new instance of Rule.
8 9 10 11 12 13 14 |
# File 'lib/build_tools/spud/rule.rb', line 8 def initialize(spud, file_context, name, deps = {}, &block) @spud = spud @file_context = file_context @name = name @deps = deps @block = block end |
Instance Method Details
#invoke(*args, **kwargs) ⇒ Object
16 17 18 |
# File 'lib/build_tools/spud/rule.rb', line 16 def invoke(*args, **kwargs) RuleContext.new(@spud, @file_context).instance_exec(*args, **kwargs, &@block) end |