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.
Instance Method Summary collapse
-
#initialize(desc = {}) ⇒ Rule
constructor
A new instance of Rule.
Constructor Details
#initialize(desc = {}) ⇒ Rule
Returns a new instance of Rule.
7 8 9 10 11 12 13 |
# File 'lib/ninja/rule.rb', line 7 def initialize(desc={}) Description.validate!(desc) @name = desc[:name] @command = desc[:command] @dependencies = desc[:dependencies] 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 |