Class: Cp8Cli::Github::ParsedUrl

Inherits:
Object
  • Object
show all
Defined in:
lib/cp8_cli/github/parsed_url.rb

Instance Method Summary collapse

Constructor Details

#initialize(url) ⇒ ParsedUrl

Returns a new instance of ParsedUrl.



4
5
6
# File 'lib/cp8_cli/github/parsed_url.rb', line 4

def initialize(url)
  @url = url
end

Instance Method Details

#numberObject



8
9
10
# File 'lib/cp8_cli/github/parsed_url.rb', line 8

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

#repoObject



12
13
14
# File 'lib/cp8_cli/github/parsed_url.rb', line 12

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