Sha256: 3251bc685c924f1f648eee556d031e6fa713f9879c9d375bd8fb1fba7c5f25a9
Contents?: true
Size: 488 Bytes
Versions: 4
Compression:
Stored size: 488 Bytes
Contents
require 'copland' registry = Copland::Registry.build calc1 = registry.service( "tutorial.Calculator" ) calc2 = registry.service( "tutorial.Calculator" ) puts "Multiples:" 10.times do puts "#{calc1.memory}\t#{calc2.memory}" calc1.memory = calc1.add( 5 ) calc2.memory = calc2.add( 2 ) end calc1.memory = 1.0 calc2.memory = 1.0 puts puts "Powers:" 10.times do puts "#{calc1.memory}\t#{calc2.memory}" calc1.memory = calc1.multiply( 5 ) calc2.memory = calc2.multiply( 2 ) end
Version data entries
4 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
copland-0.8.0 | tutorial/04/main.rb |
copland-0.8.0 | tutorial/03/main.rb |
copland-1.0.0 | tutorial/03/main.rb |
copland-1.0.0 | tutorial/04/main.rb |