Sha256: c75884061d34650c76cc1624bcd7feac805d6a4d7df212d4c907e13359066589

Contents?: true

Size: 643 Bytes

Versions: 15

Compression:

Stored size: 643 Bytes

Contents

# frozen_string_literal: true

require_relative 'tag_validatable'

module LittleWeasel
  module Modules
    # This module provides methods to manage objects that can be tagged.
    # A tag is a value that can be included as part of a DictionaryKey
    # object to make it unique across locales.
    #
    # @examples
    #
    #   en-US-<tag>
    #
    #   Where <tag> = a String to make this locale unique across locales
    #   of the same language and region.
    module Taggable
      include TagValidatable

      attr_reader :tag

      def tagged?
        tag.present?
      end

      private

      attr_writer :tag
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
LittleWeasel-5.0.13 lib/LittleWeasel/modules/taggable.rb
LittleWeasel-5.0.12 lib/LittleWeasel/modules/taggable.rb
LittleWeasel-5.0.11 lib/LittleWeasel/modules/taggable.rb
LittleWeasel-5.0.10 lib/LittleWeasel/modules/taggable.rb
LittleWeasel-5.0.9 lib/LittleWeasel/modules/taggable.rb
LittleWeasel-5.0.8 lib/LittleWeasel/modules/taggable.rb
LittleWeasel-5.0.7 lib/LittleWeasel/modules/taggable.rb
LittleWeasel-5.0.6 lib/LittleWeasel/modules/taggable.rb
LittleWeasel-5.0.5 lib/LittleWeasel/modules/taggable.rb
LittleWeasel-5.0.4 lib/LittleWeasel/modules/taggable.rb
LittleWeasel-5.0.3 lib/LittleWeasel/modules/taggable.rb
LittleWeasel-5.0.2 lib/LittleWeasel/modules/taggable.rb
LittleWeasel-5.0.1 lib/LittleWeasel/modules/taggable.rb
LittleWeasel-5.0.0 lib/LittleWeasel/modules/taggable.rb
LittleWeasel-4.0.0 lib/LittleWeasel/modules/taggable.rb