Class: Perkins::Build::Shell::Block

Inherits:
Group show all
Defined in:
lib/perkins/build/shell/node.rb

Direct Known Subclasses

Conditional, Else

Instance Attribute Summary collapse

Attributes inherited from Group

#nodes

Attributes inherited from Node

#code, #level, #options

Instance Method Summary collapse

Methods inherited from Group

#initialize

Methods included from Dsl

#cd, #echo, #elif, #else, #export, #file, #fold, #if, #newline, #set

Methods inherited from Node

#escape, #initialize, #name

Constructor Details

This class inherits a constructor from Perkins::Build::Shell::Group

Instance Attribute Details

#closeObject (readonly)

Returns the value of attribute close.



75
76
77
# File 'lib/perkins/build/shell/node.rb', line 75

def close
  @close
end

#openObject (readonly)

Returns the value of attribute open.



75
76
77
# File 'lib/perkins/build/shell/node.rb', line 75

def open
  @open
end

Instance Method Details

#cmd(code, *args) ⇒ Object



85
86
87
# File 'lib/perkins/build/shell/node.rb', line 85

def cmd(code, *args)
  super(code, *merge_options(args, level: 1))
end

#raw(code, *args) ⇒ Object



89
90
91
# File 'lib/perkins/build/shell/node.rb', line 89

def raw(code, *args)
  super(code, *merge_options(args, level: 1))
end

#script(*args) ⇒ Object



81
82
83
# File 'lib/perkins/build/shell/node.rb', line 81

def script(*args)
  super(*merge_options(args, level: 1))
end

#to_sObject



77
78
79
# File 'lib/perkins/build/shell/node.rb', line 77

def to_s
  [open, super, close].compact.join("\n")
end