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)


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

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

#start_with?(x) ⇒ Boolean

Returns:

  • (Boolean)


184
185
186
# File 'lib/quick_magick.rb', line 184

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