Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/rscale/helpers.rb

Instance Method Summary collapse

Instance Method Details

#placeholders(values = {}) ⇒ Object



6
7
8
# File 'lib/rscale/helpers.rb', line 6

def placeholders(values={})
  self.gsub(/:([a-z0-9_-]{1,})/i) { values[$1.to_sym] }
end

#shellescapeObject



2
3
4
# File 'lib/rscale/helpers.rb', line 2

def shellescape
  self.gsub(/\s/, '\ ')
end