Class: Earl::StringInquirer

Inherits:
String
  • Object
show all
Defined in:
lib/earl/string_inquirer.rb

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(meth, *args, &block) ⇒ Object



3
4
5
6
7
8
9
# File 'lib/earl/string_inquirer.rb', line 3

def method_missing( meth, *args, &block )
  if meth.to_s[ -1 ] == '?'
    meth.to_s[ 0..-2 ] == to_s
  else
    super
  end
end