Sha256: 5ccd4995b05e1ca6884c6c0ea3321a9a8bee9ef7329b06e00102de95b1af485e

Contents?: true

Size: 770 Bytes

Versions: 19

Compression:

Stored size: 770 Bytes

Contents

require "singleton"

module Evertils
  module Common
    module Manager
      class Tag < Manager::Base
        include Singleton

        #
        # @since 0.3.0
        def create(name)
          entity = Evertils::Common::Entity::Tag.new
          entity.create(name)
          entity
        end

        #
        # @since 0.3.0
        def find(name)
          entity = Evertils::Common::Entity::Tag.new
          entity.find(name)
          entity
        end

        #
        # @since 0.3.1
        def find_or_create(name, stack = nil)
          search_result = find(name)

          if !search_result
            note = create(name, stack)
          else
            note = search_result
          end

          note
        end
      end
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
evertils-common-0.3.18 lib/evertils/common/manager/tag.rb
evertils-common-0.3.17 lib/evertils/common/manager/tag.rb
evertils-common-0.3.16 lib/evertils/common/manager/tag.rb
evertils-common-0.3.15 lib/evertils/common/manager/tag.rb
evertils-common-0.3.14 lib/evertils/common/manager/tag.rb
evertils-common-0.3.13 lib/evertils/common/manager/tag.rb
evertils-common-0.3.12 lib/evertils/common/manager/tag.rb
evertils-common-0.3.11 lib/evertils/common/manager/tag.rb
evertils-common-0.3.10 lib/evertils/common/manager/tag.rb
evertils-common-0.3.9 lib/evertils/common/manager/tag.rb
evertils-common-0.3.8 lib/evertils/common/manager/tag.rb
evertils-common-0.3.7 lib/evertils/common/manager/tag.rb
evertils-common-0.3.6 lib/evertils/common/manager/tag.rb
evertils-common-0.3.5 lib/evertils/common/manager/tag.rb
evertils-common-0.3.4.1 lib/evertils/common/manager/tag.rb
evertils-common-0.3.4 lib/evertils/common/manager/tag.rb
evertils-common-0.3.4.1.pre.dev lib/evertils/common/manager/tag.rb
evertils-common-0.3.3.1 lib/evertils/common/manager/tag.rb
evertils-common-0.3.3 lib/evertils/common/manager/tag.rb