Sha256: 9aeac127fa48781ce4ec548c15bc31ff8f2a0008a9c20bfbe9d6a5d2bdce740c

Contents?: true

Size: 610 Bytes

Versions: 3

Compression:

Stored size: 610 Bytes

Contents

module Docks
  module Tags
    class Compatibility < Base
      def initialize
        @name = :compatibility
        @synonyms = [:compatible_with, :support]
        @multiline = false
        @multiple_allowed = true
      end

      def process(symbol)
        symbol.update(@name) do |compatibilities|
          compatibilities = Array(compatibilities).map { |compatibility| split_on_top_level_parens_commas_and_pipes(compatibility) }.flatten
          compatibilities.map { |compatibility| OpenStruct.new name_and_parenthetical(compatibility, :browser, :version) }
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
docks_app-0.0.3 lib/docks/tags/compatibility_tag.rb
docks_app-0.0.2 lib/docks/tags/compatibility_tag.rb
docks_app-0.0.1 lib/docks/tags/compatibility_tag.rb