Class: String

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

Instance Method Summary collapse

Instance Method Details

#starts_with?(s) ⇒ Boolean

Returns:

  • (Boolean)


48
49
50
# File 'lib/magic_encoding.rb', line 48

def starts_with?(s)
  self[0..s.length-1] == s
end