Class: Ninja::Rule
- Inherits:
-
Object
- Object
- Ninja::Rule
- Defined in:
- lib/ninja/rule.rb
Defined Under Namespace
Modules: Description
Instance Attribute Summary collapse
-
#command ⇒ Object
readonly
Returns the value of attribute command.
-
#dependencies ⇒ Object
readonly
Returns the value of attribute dependencies.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#response_file ⇒ Object
readonly
Returns the value of attribute response_file.
Instance Method Summary collapse
-
#initialize(desc = {}) ⇒ Rule
constructor
A new instance of Rule.
Constructor Details
#initialize(desc = {}) ⇒ Rule
Returns a new instance of Rule.
8 9 10 11 12 13 14 15 |
# File 'lib/ninja/rule.rb', line 8 def initialize(desc={}) Description.validate!(desc) @name = desc[:name] @command = desc[:command] @dependencies = desc[:dependencies] @response_file = desc[:response_file] end |
Instance Attribute Details
#command ⇒ Object (readonly)
Returns the value of attribute command.
3 4 5 |
# File 'lib/ninja/rule.rb', line 3 def command @command end |
#dependencies ⇒ Object (readonly)
Returns the value of attribute dependencies.
3 4 5 |
# File 'lib/ninja/rule.rb', line 3 def dependencies @dependencies end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/ninja/rule.rb', line 3 def name @name end |
#response_file ⇒ Object (readonly)
Returns the value of attribute response_file.
3 4 5 |
# File 'lib/ninja/rule.rb', line 3 def response_file @response_file end |