Class: RestMyCase::Context::Status::StatusString
- Inherits:
-
String
- Object
- String
- RestMyCase::Context::Status::StatusString
- Defined in:
- lib/rest_my_case/context/status.rb
Instance Method Summary collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args, &block) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/rest_my_case/context/status.rb', line 8 def method_missing(method, *args, &block) last_char = method[-1] method_name = method[0...-1] if last_char == '!' replace(method_name) elsif last_char == '?' self == method_name else super end end |