Class: Stitcher::Stitch::Definer

Inherits:
BasicObject
Defined in:
lib/stitcher/stitch.rb

Instance Method Summary collapse

Constructor Details

#initialize(obj) ⇒ Definer

Returns a new instance of Definer.



9
10
11
# File 'lib/stitcher/stitch.rb', line 9

def initialize obj
	@obj = obj
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name, sig, &block) ⇒ Object



13
14
15
# File 'lib/stitcher/stitch.rb', line 13

def method_missing name, sig, &block
	DefineMethod.instance_method(:stitcher_define_method).bind(@obj).(name, sig, &block)
end