Sha256: 7a850496c8c5044a6e0093ce9d52deb6400a15bff19b0eb5063d36510b58715b

Contents?: true

Size: 515 Bytes

Versions: 13

Compression:

Stored size: 515 Bytes

Contents

require_relative "../lib/procemon.rb"

class TestT

  def self.test
    puts self
  end

  def test
    puts self
  end

end

TestT.inject_instance_method :test do

  puts "hello world! instance"

end

TestT.inject_singleton_method :test, params: "after" do

  puts "hello world! singleton"

end

puts "\nafter,singleton case:"
TestT.test
puts "\nbefore,instance case:"
TestT.new.test


#after,singleton case:
#TestT
#hello world! singleton
#
#before,instance case:
#hello world! instance
##<TestT:0x00000000d4a008>

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
procemon-0.6.2 examples/how_to_inject_with_extra_process_a_method.rb
procemon-0.6.1 examples/how_to_inject_with_extra_process_a_method.rb
procemon-0.5.0 examples/how_to_inject_with_extra_process_a_method.rb
procemon-0.4.5 examples/how_to_inject_with_extra_process_a_method.rb
procemon-0.4.4 examples/how_to_inject_with_extra_process_a_method.rb
procemon-0.4.3 examples/how_to_inject_with_extra_process_a_method.rb
procemon-0.4.2 examples/how_to_inject_with_extra_process_a_method.rb
procemon-0.4.1 examples/how_to_inject_with_extra_process_a_method.rb
procemon-0.4.0 examples/how_to_inject_with_extra_process_a_method.rb
procemon-0.3.4 examples/how_to_inject_with_extra_process_a_method.rb
procemon-0.3.3 examples/how_to_inject_with_extra_process_a_method.rb
procemon-0.3.2 examples/how_to_inject_with_extra_process_a_method.rb
procemon-0.3.1 examples/how_to_inject_with_extra_process_a_method.rb