Class: Comet::Rules::Alias
- Inherits:
-
Object
- Object
- Comet::Rules::Alias
- Defined in:
- lib/comet/rules/alias.rb
Instance Method Summary collapse
- #commands ⇒ Object
- #contents ⇒ Object
-
#initialize(name, dependencies) ⇒ Alias
constructor
A new instance of Alias.
- #rules ⇒ Object
- #target ⇒ Object
Constructor Details
#initialize(name, dependencies) ⇒ Alias
Returns a new instance of Alias.
4 5 6 7 |
# File 'lib/comet/rules/alias.rb', line 4 def initialize(name, dependencies) @name = name @dependencies = dependencies end |
Instance Method Details
#commands ⇒ Object
24 25 26 |
# File 'lib/comet/rules/alias.rb', line 24 def commands {} end |
#contents ⇒ Object
13 14 15 16 17 18 |
# File 'lib/comet/rules/alias.rb', line 13 def contents [ ".PHONY: #{target}", "#{target}: #{@dependencies.map(&:target).uniq.join ' '}" ] end |
#rules ⇒ Object
20 21 22 |
# File 'lib/comet/rules/alias.rb', line 20 def rules [] end |
#target ⇒ Object
9 10 11 |
# File 'lib/comet/rules/alias.rb', line 9 def target @name end |