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



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

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

Instance Method Details

#to_aryObject



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

def to_ary
  Array.new
end

#to_hashObject



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

def to_hash
  Hash.new
end

#to_intObject



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

def to_int
  Integer(0)
end

#to_strObject



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

def to_str
  String.new
end