Sha256: 265cb22782097a6e0663b93385f055ffd30798fcf8fe3cc57c33672945be696c

Contents?: true

Size: 760 Bytes

Versions: 273

Compression:

Stored size: 760 Bytes

Contents

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

module Sample
  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 # Sample

Version data entries

273 entries across 273 versions & 4 rubygems

Version Path
devcycle-ruby-server-sdk-2.0.0 vendor/bundle/ruby/3.0.0/gems/oj-3.13.2/test/sample/doc.rb
oj-3.14.2 test/sample/doc.rb
oj-3.14.1 test/sample/doc.rb
oj-3.14.0 test/sample/doc.rb
oj-3.13.23 test/sample/doc.rb
oj-3.13.22 test/sample/doc.rb
oj-3.13.21 test/sample/doc.rb
oj-3.13.20 test/sample/doc.rb
oj-3.13.19 test/sample/doc.rb
oj-3.13.18 test/sample/doc.rb
oj-3.13.17 test/sample/doc.rb
oj-3.13.16 test/sample/doc.rb
oj-3.13.15 test/sample/doc.rb
oj-3.13.14 test/sample/doc.rb
oj-3.13.13 test/sample/doc.rb
oj-3.13.12 test/sample/doc.rb
oj-3.13.11 test/sample/doc.rb
oj-3.13.10 test/sample/doc.rb
oj-3.13.9 test/sample/doc.rb
oj-3.13.8 test/sample/doc.rb