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 =~ /^__/ }



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

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



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

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