Class: Ninja::Rule

Inherits:
Object
  • Object
show all
Defined in:
lib/ninja/rule.rb

Defined Under Namespace

Modules: Description

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#commandObject (readonly)

Returns the value of attribute command.



3
4
5
# File 'lib/ninja/rule.rb', line 3

def command
  @command
end

#dependenciesObject (readonly)

Returns the value of attribute dependencies.



3
4
5
# File 'lib/ninja/rule.rb', line 3

def dependencies
  @dependencies
end

#nameObject (readonly)

Returns the value of attribute name.



3
4
5
# File 'lib/ninja/rule.rb', line 3

def name
  @name
end

#response_fileObject (readonly)

Returns the value of attribute response_file.



3
4
5
# File 'lib/ninja/rule.rb', line 3

def response_file
  @response_file
end