Class: Prick::Build::InlineNode

Inherits:
Node
  • Object
show all
Defined in:
lib/prick/builder/node.rb

Overview

Note that #path refers to the build file

Instance Attribute Summary collapse

Attributes inherited from Node

#args, #kind, #parent, #path, #phase

Instance Method Summary collapse

Methods inherited from Node

#dump, #lines, #name, #prefix_lines, #relpath, #schema, #schema=, #source, #source_lines, #to_s

Constructor Details

#initialize(parent, phase, path, *stmts) ⇒ InlineNode

Returns a new instance of InlineNode.



86
87
88
89
# File 'lib/prick/builder/node.rb', line 86

def initialize(parent, phase, path, *stmts)
  super(parent, phase, :inline, path)
  @stmts = Array(stmts).flatten
end

Instance Attribute Details

#stmtsObject (readonly)

Returns the value of attribute stmts.



84
85
86
# File 'lib/prick/builder/node.rb', line 84

def stmts
  @stmts
end

Instance Method Details

#inspectObject



91
# File 'lib/prick/builder/node.rb', line 91

def inspect() "#@path \"#{@stmts.join(";")}\"" end