Class: String
Instance Method Summary collapse
Instance Method Details
#de_accent ⇒ Object
216 217 218 219 220 221 222 223 224 225 226 227 |
# File 'lib/flex_core.rb', line 216 def de_accent self_copy = self.deep_copy targets = { 'รข' => 'a' } targets.each { |key, value| self_copy.gsub!(key, value) } self_copy end |
#to_float ⇒ Object
212 213 214 |
# File 'lib/flex_core.rb', line 212 def to_float self.strip.sub(',', '').to_f end |