Class: Comet::Rules::Alias

Inherits:
Object
  • Object
show all
Defined in:
lib/comet/rules/alias.rb

Instance Method Summary collapse

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

#commandsObject



24
25
26
# File 'lib/comet/rules/alias.rb', line 24

def commands
  {}
end

#contentsObject



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

#rulesObject



20
21
22
# File 'lib/comet/rules/alias.rb', line 20

def rules
  []
end

#targetObject



9
10
11
# File 'lib/comet/rules/alias.rb', line 9

def target
  @name
end