Class: String

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

Instance Method Summary collapse

Instance Method Details

#end_with?(x) ⇒ Boolean

Returns:

  • (Boolean)


201
202
203
# File 'lib/quick_magick.rb', line 201

def end_with?(x)
  self.index(x) == self.length - 1
end

#start_with?(x) ⇒ Boolean

Returns:

  • (Boolean)


193
194
195
# File 'lib/quick_magick.rb', line 193

def start_with?(x)
  self.index(x) == 0
end