Class: String

Inherits:
Object show all
Defined in:
lib/ri18n/standard_exts.rb

Direct Known Subclasses

GettextScanner, Msg, PoSource

Instance Method Summary collapse

Instance Method Details

#interpolate(caller) ⇒ Object



3
4
5
# File 'lib/ri18n/standard_exts.rb', line 3

def interpolate(caller)
  caller.instance_eval('"' << self.gsub('"', '\"') << '"') 
end

#strip_qObject

strip and unquote



12
13
14
# File 'lib/ri18n/standard_exts.rb', line 12

def strip_q
  strip[1..-2]
end

#strip_q!Object



16
17
18
19
20
# File 'lib/ri18n/standard_exts.rb', line 16

def strip_q!
  strip!
  slice!(0)
  slice!(-1)
end

#unescape_quoteObject



7
8
9
# File 'lib/ri18n/standard_exts.rb', line 7

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