Class: Ninja::Build
- Inherits:
-
Object
- Object
- Ninja::Build
- Defined in:
- lib/ninja.rb
Instance Method Summary collapse
- #get_rule_object ⇒ Object
- #get_target_object ⇒ Object
- #implicit_dep_line ⇒ Object
-
#initialize(rule, target, explicit_dep, implicit_dep = nil) ⇒ Build
constructor
A new instance of Build.
- #to_ninja_format ⇒ Object
Constructor Details
#initialize(rule, target, explicit_dep, implicit_dep = nil) ⇒ Build
Returns a new instance of Build.
78 79 80 81 82 83 84 |
# File 'lib/ninja.rb', line 78 def initialize(rule, target, explicit_dep, implicit_dep=nil) @rule = rule @target = target @explicit_dep = explicit_dep @implicit_dep = implicit_dep # order-only dep is not supported because I do not get how we need it. end |
Instance Method Details
#get_rule_object ⇒ Object
90 91 92 |
# File 'lib/ninja.rb', line 90 def get_rule_object @rule end |
#get_target_object ⇒ Object
86 87 88 |
# File 'lib/ninja.rb', line 86 def get_target_object @target end |
#implicit_dep_line ⇒ Object
94 95 96 97 98 99 100 |
# File 'lib/ninja.rb', line 94 def implicit_dep_line if @implicit_dep == nil "" else @implicit_dep.to_ninja_format end end |
#to_ninja_format ⇒ Object
102 103 104 105 106 |
# File 'lib/ninja.rb', line 102 def to_ninja_format """ build #{@target.to_ninja_format}: #{@rule.name} #{@explicit_dep.to_ninja_format} #{implicit_dep_line} """ end |