Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/placemat.rb
Overview
Extends the String open class to allow quick retrieval of the first character
Instance Method Summary collapse
-
#first ⇒ Object
:nodoc:.
-
#trim_first ⇒ Object
:nodoc:.
Instance Method Details
#first ⇒ Object
:nodoc:
40 41 42 |
# File 'lib/placemat.rb', line 40 def first #:nodoc: self[0,1] end |
#trim_first ⇒ Object
:nodoc:
43 44 45 |
# File 'lib/placemat.rb', line 43 def trim_first #:nodoc: self[1,self.length] end |