Class: String

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

Instance Method Summary collapse

Instance Method Details

#starts_with?(str) ⇒ Boolean

Returns:

  • (Boolean)


8
9
10
11
# File 'lib/sprockets_fs.rb', line 8

def starts_with?(str)
  sub = self[0...(str.length)]
  sub == str
end