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.27 lib/docman/taggers/incremental_tagger.rb
docman-0.0.26 lib/docman/taggers/incremental_tagger.rb
docman-0.0.25 lib/docman/taggers/incremental_tagger.rb
docman-0.0.24 lib/docman/taggers/incremental_tagger.rb
docman-0.0.23 lib/docman/taggers/incremental_tagger.rb
docman-0.0.22 lib/docman/taggers/incremental_tagger.rb
docman-0.0.21 lib/docman/taggers/incremental_tagger.rb
docman-0.0.20 lib/docman/taggers/incremental_tagger.rb
docman-0.0.19 lib/docman/taggers/incremental_tagger.rb
docman-0.0.18 lib/docman/taggers/incremental_tagger.rb
docman-0.0.17 lib/docman/taggers/incremental_tagger.rb
docman-0.0.16 lib/docman/taggers/incremental_tagger.rb
docman-0.0.15 lib/docman/taggers/incremental_tagger.rb