Class: Instantiator::MethodInvocationSink

Inherits:
BlankSlate
  • Object
show all
Defined in:
lib/instantiator.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



17
18
19
# File 'lib/instantiator.rb', line 17

def method_missing(method_name, *args, &block)
  MethodInvocationSink.new
end

Instance Method Details

#to_aryObject



26
27
28
# File 'lib/instantiator.rb', line 26

def to_ary
  Array.new
end

#to_hashObject



29
30
31
# File 'lib/instantiator.rb', line 29

def to_hash
  Hash.new
end

#to_intObject



23
24
25
# File 'lib/instantiator.rb', line 23

def to_int
  Integer(0)
end

#to_strObject



20
21
22
# File 'lib/instantiator.rb', line 20

def to_str
  String.new
end