Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/nub/string.rb
Overview
Monkey patch string with some useful methods
Instance Method Summary collapse
Instance Method Details
#to_ascii ⇒ Object
24 25 26 27 28 29 30 31 32 |
# File 'lib/nub/string.rb', line 24 def to_ascii = { :invalid => :replace, :undef => :replace, :replace => '', :universal_newline => true } return self.encode(Encoding.find('ASCII'), ) end |