Class: String

Inherits:
Object show all
Includes:
NOMS::BashOn
Defined in:
lib/noms/bashon.rb

Instance Method Summary collapse

Methods included from NOMS::BashOn

#name_key

Instance Method Details

#bqObject



315
316
317
# File 'lib/noms/bashon.rb', line 315

def bq
   self.gsub("'", "'\''")
end

#to_bashon(*name) ⇒ Object



319
320
321
322
323
324
325
# File 'lib/noms/bashon.rb', line 319

def to_bashon(*name)
   if name.empty?
      self
   else
      "function #{name_key(name)} { echo '#{self.to_bashon.bq}'; }"
   end
end