Class: String

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

Instance Method Summary collapse

Instance Method Details

#apprmatch(obj) ⇒ Object

Match string or regexp


20
21
22
# File 'lib/extensions.rb', line 20

def apprmatch(obj)
  obj.kind_of?(String) && self == obj || obj.kind_of?(Regexp) && self =~ obj
end