Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/self_inquirer/string.rb
Instance Method Summary collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method_name, *args, &block) ⇒ Object
2 3 4 5 6 7 8 |
# File 'lib/self_inquirer/string.rb', line 2 def method_missing(method_name, *args, &block) if method_name.to_s.end_with? "?" self == method_name.to_s[0..-2] else super end end |