Class: String

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

Overview

Force encoding change for Ruby 1.9

for more information see http://goo.gl/alaUM

Instance Method Summary collapse

Instance Method Details

#encode!Object



27
28
29
30
# File 'lib/day.rb', line 27

def encode!
  (defined?(Encoding) && self.respond_to?(:force_encoding)) ? 
    self.force_encoding('ASCII-8BIT') : self
end

#to_downcaseObject



32
33
34
# File 'lib/day.rb', line 32

def to_downcase
  ::Unicode::downcase(self)
end