Module: Tins::SymbolMaker

Defined in:
lib/tins/dslkit.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.



261
262
263
264
265
266
267
# File 'lib/tins/dslkit.rb', line 261

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