Class: String

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

Instance Method Summary collapse

Instance Method Details

#starts_with?(prefix) ⇒ Boolean

Returns:

  • (Boolean)


65
66
67
68
# File 'lib/diff_dirs.rb', line 65

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