Sha256: 88182768e63f6d4982e13b77946192fdaf7dc98dde3a0fd725455092a8fa78c2
Contents?: true
Size: 500 Bytes
Versions: 5
Compression:
Stored size: 500 Bytes
Contents
covers 'facets/module/instance_function' test_case Module do method :instance_function do setup "using instance_function" do @m = Module.new do instance_function def self.jumble(obj, arg) obj + arg end end end test "class method" do r = @m.jumble('Try', 'Me') r.assert == 'TryMe' end test "instance method" do s = 'Try' s.extend @m r = s.jumble('Me') r.assert == 'TryMe' end end end
Version data entries
5 entries across 5 versions & 2 rubygems