Method: OutputMode::Callable#method_char
- Defined in:
- lib/output_mode/callable.rb
#method_char(bang!) ⇒ '!' #method_char(question?) ⇒ '?' #method_char(other) ⇒ Nil
Determines the “type” associated with a dynamic method
193 194 195 196 |
# File 'lib/output_mode/callable.rb', line 193 def method_char(s) char = s[-1] ['?', '!'].include?(char) ? char : nil end |