Module: DSLKit::SymbolMaker

Defined in:
lib/dslkit/polite.rb

Overview

This module can be included in another module/class. It generates a symbol for every missing method that was called in the context of this module/class.

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(id, *args) ⇒ Object

Returns a symbol (id) for every missing method named id.



358
359
360
361
362
363
364
# File 'lib/dslkit/polite.rb', line 358

def method_missing(id, *args)
  if args.empty?
    id
  else
    super
  end
end