Class: String

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

Instance Method Summary (collapse)

Instance Method Details

- (Boolean) starts_with?(prefix)

Returns:

  • (Boolean)


134
135
136
137
# File 'lib/sinatra/ratpack.rb', line 134

def starts_with?(prefix)
  prefix = prefix.to_s
  self[0, prefix.length] == prefix
end