Class: Prick::Build::CommandNode
Instance Attribute Summary
Attributes inherited from Node
#args, #kind, #parent, #path, #phase, #source
Instance Method Summary collapse
- #filename ⇒ Object
-
#initialize(parent, phase, path, args = nil) ⇒ CommandNode
constructor
A new instance of CommandNode.
- #inspect ⇒ Object
- #relpath ⇒ Object
Methods inherited from Node
#dump, #lines, #name, #prefix_lines, #schema, #schema=, #source_lines, #to_s
Constructor Details
#initialize(parent, phase, path, args = nil) ⇒ CommandNode
Returns a new instance of CommandNode.
130 131 132 133 |
# File 'lib/prick/builder/node.rb', line 130 def initialize(parent, phase, path, args = nil) constrain args, [String] super(parent, phase, :exe, path, args) end |
Instance Method Details
#filename ⇒ Object
127 |
# File 'lib/prick/builder/node.rb', line 127 def filename = File.basename(path) |
#inspect ⇒ Object
135 |
# File 'lib/prick/builder/node.rb', line 135 def inspect() "#{path} #{(args || []).join(" ")}" end |
#relpath ⇒ Object
128 |
# File 'lib/prick/builder/node.rb', line 128 def relpath = path.sub(/^#{Dir.getwd}\//, "") |