Sha256: 59e1b930c3d5854113a337fb888043aa574b789aad6abd1a544bd7836a89dcd3
Contents?: true
Size: 406 Bytes
Versions: 2
Compression:
Stored size: 406 Bytes
Contents
module Rubinstein class World attr_accessor :name, :locations, :player def initialize(name,&block) @name = name @locations = {} @player = Player.new instance_eval &block end def location(name,&block) @locations[name] = Location.new(name,&block) end def start(location) @player.location = @locations[location] end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rubinstein-0.0.2 | lib/rubinstein/world.rb |
rubinstein-0.0.1 | lib/rubinstein/world.rb |