Sha256: 5596e6331d29c07afd9cf0d021f8245bd06e13ac6a99f40eac036db053487b8f

Contents?: true

Size: 684 Bytes

Versions: 3

Compression:

Stored size: 684 Bytes

Contents

module Docks
  module Tags
    class Beta < Base
      def initialize
        @name = :beta
        @synonyms = [:experimental]
      end

      def process(symbol)
        symbol.update(@name) do |beta|
          beta = multiline_description(beta) do |first_line|
            if match = first_line.match(/\s*(?<version>.*?)(?:\s+\-\s+(?<description>.*))?$/)
              description = match[:description]
              {
                version: match[:version],
                description: description.nil? || description.length == 0 ? nil : match[:description]
              }
            end
          end

          OpenStruct.new(beta)
        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/beta_tag.rb
docks_app-0.0.2 lib/docks/tags/beta_tag.rb
docks_app-0.0.1 lib/docks/tags/beta_tag.rb