Class: Symbol

Inherits:
Object
  • Object
show all
Defined in:
lib/self_inquirer/symbol.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/symbol.rb', line 2

def method_missing(method_name, *args, &block)
  if method_name.to_s.end_with? "?"
    self == method_name.to_s[0..-2].to_sym
  else
    super
  end
end