Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/quickpress.rb
Instance Method Summary collapse
-
#remove_starting ⇒ Object
Removes starting whitespace.
-
#remove_starting! ⇒ Object
Removes starting whitespace (destructive).
Instance Method Details
#remove_starting ⇒ Object
Removes starting whitespace.
14 15 16 |
# File 'lib/quickpress.rb', line 14 def remove_starting dup.remove_starting! end |
#remove_starting! ⇒ Object
Removes starting whitespace (destructive).
19 20 21 |
# File 'lib/quickpress.rb', line 19 def remove_starting! self.gsub(/^ +/, "") end |