Sha256: 8bd4298177fce1c3a38858e4a4baff5f83590db72bc4df9cc51cea36b2df5dc8

Contents?: true

Size: 326 Bytes

Versions: 93

Compression:

Stored size: 326 Bytes

Contents

require 'docman/taggers/tagger'

module Docman
  class IncrementalTagger < Docman::Taggers::Tagger

    register_tagger :incremental

    def execute
      version = self['prev_version'].nil? ? 0 : self['prev_version'].to_i
      version = 0 unless version.is_a? Integer
      version + 1
    rescue
      1
    end

  end
end

Version data entries

93 entries across 93 versions & 1 rubygems

Version Path
docman-0.0.107 lib/docman/taggers/incremental_tagger.rb
docman-0.0.106 lib/docman/taggers/incremental_tagger.rb
docman-0.0.105 lib/docman/taggers/incremental_tagger.rb
docman-0.0.104 lib/docman/taggers/incremental_tagger.rb
docman-0.0.103 lib/docman/taggers/incremental_tagger.rb
docman-0.0.102 lib/docman/taggers/incremental_tagger.rb
docman-0.0.101 lib/docman/taggers/incremental_tagger.rb
docman-0.0.100 lib/docman/taggers/incremental_tagger.rb
docman-0.0.99 lib/docman/taggers/incremental_tagger.rb
docman-0.0.98 lib/docman/taggers/incremental_tagger.rb
docman-0.0.97 lib/docman/taggers/incremental_tagger.rb
docman-0.0.96 lib/docman/taggers/incremental_tagger.rb
docman-0.0.95 lib/docman/taggers/incremental_tagger.rb
docman-0.0.94 lib/docman/taggers/incremental_tagger.rb
docman-0.0.93 lib/docman/taggers/incremental_tagger.rb
docman-0.0.92 lib/docman/taggers/incremental_tagger.rb
docman-0.0.91 lib/docman/taggers/incremental_tagger.rb
docman-0.0.90 lib/docman/taggers/incremental_tagger.rb
docman-0.0.89 lib/docman/taggers/incremental_tagger.rb
docman-0.0.88 lib/docman/taggers/incremental_tagger.rb