Sha256: b676d8d704a423e2915459c7add244b5b92fd76d720a4f626772665baa480686

Contents?: true

Size: 831 Bytes

Versions: 40

Compression:

Stored size: 831 Bytes

Contents

require 'test/ox/hasprops'
require 'test/ox/group'
require 'test/ox/layer'
require 'test/ox/line'
require 'test/ox/shape'
require 'test/ox/oval'
require 'test/ox/rect'
require 'test/ox/text'
require 'test/ox/change'

module Test
  module Ox
    class Doc
      include HasProps
      
      attr_accessor :title
      attr_accessor :create_time
      attr_accessor :user
      # Hash of layers in the document indexed by layer name.
      attr_reader :layers
      attr_reader :change_history

      def initialize(title)
        @title = title
        @user = ENV['USER']
        @create_time = Time.now
        @layers = { }
        @change_history = []
      end
      
      def add_change(comment, time=nil, user=nil)
        @change_history << Change.new(comment, time, user)
      end

    end # Doc
  end # Ox
end # Test

Version data entries

40 entries across 40 versions & 1 rubygems

Version Path
ox-1.5.4 test/ox/doc.rb
ox-1.5.3 test/ox/doc.rb
ox-1.5.2 test/ox/doc.rb
ox-1.5.1 test/ox/doc.rb
ox-1.5.0 test/ox/doc.rb
ox-1.4.6 test/ox/doc.rb
ox-1.4.5 test/ox/doc.rb
ox-1.4.4 test/ox/doc.rb
ox-1.4.3 test/ox/doc.rb
ox-1.4.2 test/ox/doc.rb
ox-1.4.1 test/ox/doc.rb
ox-1.4.0 test/ox/doc.rb
ox-1.3.5 test/ox/doc.rb
ox-1.3.4 test/ox/doc.rb
ox-1.3.3 test/ox/doc.rb
ox-1.3.2 test/ox/doc.rb
ox-1.3.1 test/ox/doc.rb
ox-1.3.0 test/ox/doc.rb
ox-1.2.15 test/ox/doc.rb
ox-1.2.14 test/ox/doc.rb