Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/asciify.rb
Instance Method Summary collapse
- #ascii? ⇒ Boolean
-
#asciify(*args) ⇒ Object
removes all characters which are not part of ascii and replaces them with
replacement
.
Instance Method Details
#ascii? ⇒ Boolean
100 101 102 |
# File 'lib/asciify.rb', line 100 def ascii? self.to_enum(:each_byte).all? { |b| b < 128 } end |