Class: String

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

Overview

Extends the String open class to allow quick retrieval of the first character

Instance Method Summary collapse

Instance Method Details

#firstObject

:nodoc:



40
41
42
# File 'lib/placemat.rb', line 40

def first #:nodoc:
  self[0,1]
end

#trim_firstObject

:nodoc:



43
44
45
# File 'lib/placemat.rb', line 43

def trim_first #:nodoc:
  self[1,self.length]
end