Class: Cp8Cli::Github::ParsedUrl
- Inherits:
-
Object
- Object
- Cp8Cli::Github::ParsedUrl
- Defined in:
- lib/cp8_cli/github/parsed_url.rb
Instance Method Summary collapse
-
#initialize(url) ⇒ ParsedUrl
constructor
A new instance of ParsedUrl.
- #number ⇒ Object
- #repo ⇒ Object
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
#number ⇒ Object
8 9 10 |
# File 'lib/cp8_cli/github/parsed_url.rb', line 8 def number parts.last.split("#").first end |
#repo ⇒ Object
12 13 14 |
# File 'lib/cp8_cli/github/parsed_url.rb', line 12 def repo parts[3, 2].join("/") end |