Class: String

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

Instance Method Summary collapse

Instance Method Details

#starts_with?(val) ⇒ Boolean

Returns:

  • (Boolean)


135
136
137
138
139
140
141
# File 'lib/cobweb_crawler.rb', line 135

def starts_with?(val)
  if self.length >= val.length
    self[0..val.length-1] == val
  else
    false
  end
end