Class: Prepd::StringInquirer

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

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method_name, *arguments) ⇒ Object

Copied from ActiveSupport::StringInquirer



7
8
9
10
11
12
13
# File 'lib/prepd.rb', line 7

def method_missing(method_name, *arguments)
  if method_name[-1] == '?'
    self == method_name[0..-2]
  else
    super
  end
end