Sha256: 5cb7abd38d59d90da729c4bcf143aae5bf5054b0a78997d8fee51794bcca033b

Contents?: true

Size: 325 Bytes

Versions: 2

Compression:

Stored size: 325 Bytes

Contents

module Cp8Cli
  module Github
    class ParsedUrl
      def initialize(url)
        @url = url
      end

      def number
        parts.last
      end

      def repo
        parts[3, 2].join("/")
      end

      private

        attr_accessor :url

        def parts
          url.split("/")
        end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
cp8_cli-4.1.0 lib/cp8_cli/github/parsed_url.rb
cp8_cli-4.0.1 lib/cp8_cli/github/parsed_url.rb