Sha256: 573d789527377259f822093f61e28c17a5ef7f639da09aec4a07fea3140fadde
Contents?: true
Size: 469 Bytes
Versions: 1
Compression:
Stored size: 469 Bytes
Contents
covers 'facets/module/instance_function' tests Module do instance "using instance_function" do Module.new do instance_function def self.jumble(obj, arg) obj + arg end end end unit :instance_function => "class method" do |m| r = m.jumble('Try', 'Me') r.assert == 'TryMe' end unit :instance_function => "instance method" do |m| s = 'Try' s.extend m r = s.jumble('Me') r.assert == 'TryMe' end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
facets-2.9.0.pre.1 | test/tour/module/test_instance_function.rb |