Sha256: 652b6b7cd8f77419cd4089426fd1b78f7304c5397eee33c2a7daa0bd5f61acb6

Contents?: true

Size: 356 Bytes

Versions: 10

Compression:

Stored size: 356 Bytes

Contents

module Cp8Cli
  module Github
    class ParsedShortLink
      def initialize(short_link)
        @short_link = short_link
      end

      def number
        parts.last
      end

      def repo
        parts.first
      end

      private

        attr_accessor :short_link

        def parts
          short_link.split("#")
        end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
cp8_cli-6.0.1 lib/cp8_cli/github/parsed_short_link.rb
cp8_cli-6.0.0 lib/cp8_cli/github/parsed_short_link.rb
cp8_cli-5.0.0 lib/cp8_cli/github/parsed_short_link.rb
cp8_cli-4.2.1 lib/cp8_cli/github/parsed_short_link.rb
cp8_cli-4.2.0 lib/cp8_cli/github/parsed_short_link.rb
cp8_cli-4.1.3 lib/cp8_cli/github/parsed_short_link.rb
cp8_cli-4.1.2 lib/cp8_cli/github/parsed_short_link.rb
cp8_cli-4.1.1 lib/cp8_cli/github/parsed_short_link.rb
cp8_cli-4.1.0 lib/cp8_cli/github/parsed_short_link.rb
cp8_cli-4.0.1 lib/cp8_cli/github/parsed_short_link.rb