Sha256: e8febcd453b1220b5b9fd67118be12940a0e917b076f223bf2a2cfc9bee8b825

Contents?: true

Size: 278 Bytes

Versions: 28

Compression:

Stored size: 278 Bytes

Contents

module Lookbook
  class PriorityTag < YardTag
    DEFAULT_PRIORITY = 100000

    def value
      if text.present?
        int = text.to_i
        (int == 0) ? DEFAULT_PRIORITY : int
      else
        DEFAULT_PRIORITY
      end
    end

    alias_method :to_i, :value
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
lookbook-2.3.4 lib/lookbook/tags/priority_tag.rb
lookbook-2.3.3 lib/lookbook/tags/priority_tag.rb
lookbook-2.3.2 lib/lookbook/tags/priority_tag.rb
lookbook-2.3.0 lib/lookbook/tags/priority_tag.rb
lookbook-2.2.2 lib/lookbook/tags/priority_tag.rb
lookbook-2.2.1 lib/lookbook/tags/priority_tag.rb
lookbook-2.2.0 lib/lookbook/tags/priority_tag.rb
lookbook-2.1.1 lib/lookbook/tags/priority_tag.rb
lookbook-2.1.0 lib/lookbook/tags/priority_tag.rb
lookbook-2.0.5 lib/lookbook/tags/priority_tag.rb
lookbook-2.0.4 lib/lookbook/tags/priority_tag.rb
lookbook-2.0.3 lib/lookbook/tags/priority_tag.rb
lookbook-2.0.2 lib/lookbook/tags/priority_tag.rb
lookbook-2.0.1 lib/lookbook/tags/priority_tag.rb
lookbook-2.0.0 lib/lookbook/tags/priority_tag.rb
lookbook-2.0.0.rc.3 lib/lookbook/tags/priority_tag.rb
lookbook-2.0.0.rc.2 lib/lookbook/tags/priority_tag.rb
lookbook-2.0.0.rc.1 lib/lookbook/tags/priority_tag.rb
lookbook-2.0.0.beta.9 lib/lookbook/tags/priority_tag.rb
lookbook-2.0.0.beta.8 lib/lookbook/tags/priority_tag.rb