Class: Object

Inherits:
BasicObject
Defined in:
lib/api_hammer/public_instance_exec.rb

Instance Method Summary collapse

Instance Method Details

#public_instance_eval(&block) ⇒ Object

like instance_eval, but only gives access to public methods. no private or protected methods, no instance variables.



28
29
30
# File 'lib/api_hammer/public_instance_exec.rb', line 28

def public_instance_eval(&block)
  PublicForwarder.new(self).instance_eval(&block)
end

#public_instance_exec(*args, &block) ⇒ Object

like instance_exec, but only gives access to public methods. no private or protected methods, no instance variables.



22
23
24
# File 'lib/api_hammer/public_instance_exec.rb', line 22

def public_instance_exec(*args, &block)
  PublicForwarder.new(self).instance_exec(*args, &block)
end