Sha256: d5361366f847a2f3985759730cb7d4b95bfe5bba4c431ee49230da9c09df5f6f

Contents?: true

Size: 342 Bytes

Versions: 19

Compression:

Stored size: 342 Bytes

Contents

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

      def number
        parts.last.split("#").first
      end

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

      private

        attr_accessor :url

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

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
cp8_cli-9.1.1 lib/cp8_cli/github/parsed_url.rb
cp8_cli-9.1.0 lib/cp8_cli/github/parsed_url.rb
cp8_cli-9.0.3 lib/cp8_cli/github/parsed_url.rb
cp8_cli-9.0.2 lib/cp8_cli/github/parsed_url.rb
cp8_cli-9.0.1 lib/cp8_cli/github/parsed_url.rb
cp8_cli-9.0.0 lib/cp8_cli/github/parsed_url.rb
cp8_cli-8.2.1 lib/cp8_cli/github/parsed_url.rb
cp8_cli-8.2.0 lib/cp8_cli/github/parsed_url.rb
cp8_cli-8.1.0 lib/cp8_cli/github/parsed_url.rb
cp8_cli-8.0.1 lib/cp8_cli/github/parsed_url.rb
cp8_cli-8.0.0 lib/cp8_cli/github/parsed_url.rb
cp8_cli-6.0.1 lib/cp8_cli/github/parsed_url.rb
cp8_cli-6.0.0 lib/cp8_cli/github/parsed_url.rb
cp8_cli-5.0.0 lib/cp8_cli/github/parsed_url.rb
cp8_cli-4.2.1 lib/cp8_cli/github/parsed_url.rb
cp8_cli-4.2.0 lib/cp8_cli/github/parsed_url.rb
cp8_cli-4.1.3 lib/cp8_cli/github/parsed_url.rb
cp8_cli-4.1.2 lib/cp8_cli/github/parsed_url.rb
cp8_cli-4.1.1 lib/cp8_cli/github/parsed_url.rb