Sha256: d3a2ac0eadaa51f3b76b99eaa0b2e65e4d578d2ccc56a70e9dd14410ffec5309
Contents?: true
Size: 455 Bytes
Versions: 1
Compression:
Stored size: 455 Bytes
Contents
require 'nano/module/wrap_method' class Module private alias_method( :wrap, :wrap_method ) end # _____ _ # |_ _|__ ___| |_ # | |/ _ \/ __| __| # | | __/\__ \ |_ # |_|\___||___/\__| # =begin test require 'test/unit' class TCModule < Test::Unit::TestCase def fixture_method; "A"; end wrap( :fixture_method ) { |old| old.call + "B" } def test_wrap assert_equal( "AB", fixture_method ) end end =end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
facets-0.9.0 | lib/nano/module/wrap.rb |