Sha256: c8b039e4c43c5b8810439fc372b8039957e2f9d713ae6d40914ab925647d6fc6

Contents?: true

Size: 581 Bytes

Versions: 257

Compression:

Stored size: 581 Bytes

Contents

# frozen_string_literal: true

module Avm
  module Scms
    class Inflector
      class << self
        def default_instance
          @default_instance ||= new
        end
      end

      ISSUE_POINTER_NAME_PREFIX = 'issue_'
      POINTER_NAME_TO_ISSUE_PATTERN = /\A#{Regexp.quote(ISSUE_POINTER_NAME_PREFIX)}(\d+)\z/.freeze
      POINTER_NAME_TO_ISSUE_PARSER = POINTER_NAME_TO_ISSUE_PATTERN.to_parser { |m| m[1] }

      # @return [String, nil]
      def pointer_name_to_issue_id(pointer_name)
        POINTER_NAME_TO_ISSUE_PARSER.parse(pointer_name)
      end
    end
  end
end

Version data entries

257 entries across 257 versions & 3 rubygems

Version Path
avm-0.94.1 lib/avm/scms/inflector.rb
eac_tools-0.98.0 sub/avm/lib/avm/scms/inflector.rb
avm-0.94.0 lib/avm/scms/inflector.rb
eac_tools-0.94.0 sub/avm/lib/avm/scms/inflector.rb
avm-0.93.0 lib/avm/scms/inflector.rb
eac_tools-0.92.0 sub/avm/lib/avm/scms/inflector.rb
avm-0.92.0 lib/avm/scms/inflector.rb
eac_tools-0.91.0 sub/avm/lib/avm/scms/inflector.rb
avm-0.90.1 lib/avm/scms/inflector.rb
eac_tools-0.87.1 sub/avm/lib/avm/scms/inflector.rb
avm-0.90.0 lib/avm/scms/inflector.rb
eac_tools-0.87.0 sub/avm/lib/avm/scms/inflector.rb
avm-0.89.0 lib/avm/scms/inflector.rb
eac_tools-0.86.12 sub/avm/lib/avm/scms/inflector.rb
avm-0.88.0 lib/avm/scms/inflector.rb
eac_tools-0.86.11 sub/avm/lib/avm/scms/inflector.rb
avm-0.87.0 lib/avm/scms/inflector.rb
eac_tools-0.86.8 sub/avm/lib/avm/scms/inflector.rb
avm-0.86.2 lib/avm/scms/inflector.rb
eac_tools-0.86.7 sub/avm/lib/avm/scms/inflector.rb