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.47 lib/docman/taggers/incremental_tagger.rb
docman-0.0.46 lib/docman/taggers/incremental_tagger.rb
docman-0.0.45 lib/docman/taggers/incremental_tagger.rb
docman-0.0.44 lib/docman/taggers/incremental_tagger.rb
docman-0.0.43 lib/docman/taggers/incremental_tagger.rb
docman-0.0.42 lib/docman/taggers/incremental_tagger.rb
docman-0.0.41 lib/docman/taggers/incremental_tagger.rb
docman-0.0.40 lib/docman/taggers/incremental_tagger.rb
docman-0.0.39 lib/docman/taggers/incremental_tagger.rb
docman-0.0.38 lib/docman/taggers/incremental_tagger.rb
docman-0.0.37 lib/docman/taggers/incremental_tagger.rb
docman-0.0.36 lib/docman/taggers/incremental_tagger.rb
docman-0.0.35 lib/docman/taggers/incremental_tagger.rb
docman-0.0.34 lib/docman/taggers/incremental_tagger.rb
docman-0.0.33 lib/docman/taggers/incremental_tagger.rb
docman-0.0.32 lib/docman/taggers/incremental_tagger.rb
docman-0.0.31 lib/docman/taggers/incremental_tagger.rb
docman-0.0.30 lib/docman/taggers/incremental_tagger.rb
docman-0.0.29 lib/docman/taggers/incremental_tagger.rb
docman-0.0.28 lib/docman/taggers/incremental_tagger.rb