Method: Keyword::ClassMethods#try

Defined in:
lib/diml/elements/keyword.rb

#try(v) ⇒ Object



26
27
28
29
30
31
32
# File 'lib/diml/elements/keyword.rb', line 26

def try(v)
  # TODO: add more intelligence to this
  # i.e. not just starting with
  return false if v.nil?

  v.start_with?(token)
end