Class: Kernel::Pry

Inherits:
AE::BasicObject
Defined in:
lib/ae/pry.rb

Overview

Pry Functor

Instance Method Summary collapse

Methods inherited from AE::BasicObject

find_hidden_method, hide, reveal

Constructor Details

#initialize(&function) ⇒ Pry

instance_methods.each{ |m| private m unless m.to_s =~ /^__/ }



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

def initialize(&function)
  @function = function
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(op, *a, &b) ⇒ Object



33
34
35
# File 'lib/ae/pry.rb', line 33

def method_missing(op, *a, &b)
  @function.call(op, *a, &b)
end