!RBIX 12079494195756429234 x M 1 n n x 10 __script__ i 38 5 7 0 64 47 49 1 1 15 99 7 2 1 65 49 3 3 13 99 12 7 4 12 7 5 12 65 12 49 6 4 15 49 4 0 15 2 11 I 6 I 0 I 0 I 0 n p 7 s 44 active_support/core_ext/module/remove_method x 7 require x 6 Module x 10 open_class x 14 __class_init__ M 1 n n x 6 Module i 16 5 66 99 7 0 7 1 65 67 49 2 0 49 3 4 11 I 5 I 0 I 0 I 0 n p 4 x 8 delegate M 1 n n x 8 delegate i 200 20 0 49 0 0 19 1 15 20 1 45 1 2 49 3 1 13 9 29 15 20 1 7 4 49 5 1 19 2 9 34 1 8 45 5 45 6 7 7 8 64 47 49 9 2 15 20 1 7 10 49 5 1 2 83 11 13 9 91 15 20 1 7 4 49 5 1 49 12 0 7 13 13 70 9 88 15 44 43 14 7 15 78 49 16 2 6 13 49 17 1 9 106 5 45 6 18 7 19 64 47 49 9 2 8 107 1 15 20 1 7 10 49 5 1 13 9 149 15 20 1 7 10 49 5 1 2 83 11 9 135 20 2 8 142 20 1 7 10 49 5 1 47 101 12 7 20 63 2 13 10 156 15 7 21 64 19 3 15 5 48 22 49 23 0 7 24 64 80 49 25 2 97 37 19 4 15 37 19 5 15 15 2 15 20 5 49 26 0 19 5 15 20 0 56 27 50 28 0 11 I a I 6 I 0 I 0 I 0 p 29 x 3 pop x 4 Hash n x 5 is_a? x 2 to x 2 [] x 13 ArgumentError n s 126 Delegation needs a target. Supply an options hash with a :to key as the last argument (e.g. delegate :hello, :to => :greeter). x 5 raise x 6 prefix x 2 == x 4 to_s n x 6 Regexp s 8 ^[^a-z_] x 3 new x 2 =~ n s 77 Can only automatically set the delegation prefix when delegating to a method. s 1 _ s 0 x 6 caller x 5 first s 1 : x 5 split x 4 to_i M 1 p 2 x 9 for_block t n x 8 delegate i 160 57 19 0 15 21 1 1 7 0 49 1 1 9 19 7 2 64 8 65 7 3 5 47 101 4 7 5 21 1 3 47 101 4 20 0 47 101 4 7 6 21 1 2 47 101 4 7 7 20 0 47 101 4 7 8 21 1 2 47 101 4 7 9 63 12 19 1 15 5 7 10 21 1 3 47 101 4 20 0 47 101 4 7 11 21 1 3 47 101 4 20 0 47 101 4 7 12 21 1 3 47 101 4 20 0 47 101 4 7 13 21 1 2 47 101 4 7 14 20 0 49 15 0 47 101 4 7 16 21 1 2 47 101 4 7 17 20 1 47 101 4 7 18 63 18 21 1 4 21 1 5 4 5 82 19 47 49 20 3 11 I 16 I 2 I 1 I 1 n p 21 x 9 allow_nil x 2 [] s 6 return s 7 raise " x 4 to_s s 1 # s 14 delegated to s 1 . s 6 , but s 25 is nil: #{self.inspect}" s 57 if instance_methods(false).map(&:to_s).include?(" s 37 ") remove_possible_method(" s 28 ") end def s 75 (*args, &block) # def customer_name(*args, &block) s 10 .__send__( x 7 inspect s 156 , *args, &block) # client.__send__(:name, *args, &block) rescue NoMethodError # rescue NoMethodError if s 73 .nil? # if client.nil? s 351 # return # depends on :allow_nil else # else raise # raise end # end end # end x 1 - x 11 module_eval p 27 I 0 I 79 I 4 I 7b I e I 7c I 13 I 7e I 41 I 7a I 44 I 81 I 45 I 82 I 54 I 83 I 61 I 86 I 6e I 87 I 80 I 89 I 88 I 8a I 91 I 81 I a0 x 99 /Users/santiago/WyeWorks/Projs/rails/activesupport/lib/active_support/core_ext/module/delegation.rb p 2 x 6 method x 6 on_nil x 4 each p 23 I -1 I 6a I 0 I 6b I 8 I 6c I 22 I 6d I 2e I 70 I 5d I 71 I 6a I 70 I 6c I 74 I 9f I 76 I b8 I 77 I c0 I 79 I c8 x 99 /Users/santiago/WyeWorks/Projs/rails/activesupport/lib/active_support/core_ext/module/delegation.rb p 6 x 7 methods x 7 options x 2 to x 6 prefix x 4 file x 4 line x 17 method_visibility x 15 add_defn_method p 3 I 2 I 6a I 10 x 99 /Users/santiago/WyeWorks/Projs/rails/activesupport/lib/active_support/core_ext/module/delegation.rb p 0 x 13 attach_method p 5 I 0 I 1 I 9 I 3 I 26 x 99 /Users/santiago/WyeWorks/Projs/rails/activesupport/lib/active_support/core_ext/module/delegation.rb p 0