Module: StrongDelegate

Defined in:
lib/strong_delegate.rb,
lib/strong_delegate/version.rb

Defined Under Namespace

Modules: ClassMethods Classes: InvalidInterfaceError

Constant Summary collapse

VERSION =
"0.1.0"

Class Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name, *args, &block) ⇒ Object (private)



41
42
43
44
45
46
47
# File 'lib/strong_delegate.rb', line 41

def method_missing(name, *args, &block)
  if self.class.delegate_methods.key?(name.to_sym)
    invoke_delegate_method!(name.to_sym, args, block)
  else
    super
  end
end

Class Method Details

.included(base) ⇒ Object



6
7
8
# File 'lib/strong_delegate.rb', line 6

def self.included(base)
  base.extend(ClassMethods)
end