Class: Cp8Cli::Repo
- Inherits:
- 
      Object
      
        - Object
- Cp8Cli::Repo
 
- Defined in:
- lib/cp8_cli/repo.rb
Class Method Summary collapse
Instance Method Summary collapse
- 
  
    
      #initialize(path)  ⇒ Repo 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    A new instance of Repo. 
- #shorthand ⇒ Object
- #url ⇒ Object
- #user ⇒ Object
Constructor Details
#initialize(path) ⇒ Repo
Returns a new instance of Repo.
| 8 9 10 | # File 'lib/cp8_cli/repo.rb', line 8 def initialize(path) @path = path end | 
Class Method Details
Instance Method Details
#shorthand ⇒ Object
| 12 13 14 | # File 'lib/cp8_cli/repo.rb', line 12 def shorthand "#{user}/#{name}" end | 
#url ⇒ Object
| 16 17 18 | # File 'lib/cp8_cli/repo.rb', line 16 def url "https://github.com/#{shorthand}" end | 
#user ⇒ Object
| 20 21 22 | # File 'lib/cp8_cli/repo.rb', line 20 def user path.split('/').first end |