Class: String

Inherits:
Object show all
Defined in:
lib/flex_core.rb

Instance Method Summary collapse

Instance Method Details

#de_accentObject



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_floatObject



212
213
214
# File 'lib/flex_core.rb', line 212

def to_float
  self.strip.sub(',', '').to_f
end