Class: Gitti::GitHubRepo
- Inherits:
-
Object
- Object
- Gitti::GitHubRepo
- Defined in:
- lib/gitti/base.rb
Overview
or Git::GitHub or Git::Source::GitHub or such - why? why not?
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#owner ⇒ Object
readonly
Returns the value of attribute owner.
Instance Method Summary collapse
-
#http_clone_url ⇒ Object
use clone_url( http: true ) – why? why not?.
- #https_clone_url ⇒ Object
-
#initialize(owner, name) ⇒ GitHubRepo
constructor
A new instance of GitHubRepo.
- #ssh_clone_url ⇒ Object
Constructor Details
#initialize(owner, name) ⇒ GitHubRepo
Returns a new instance of GitHubRepo.
32 33 34 35 |
# File 'lib/gitti/base.rb', line 32 def initialize( owner, name ) @owner = owner ## use/rename to login or something - why? why not?? @name = name # e.g. "rubylibs/webservice" end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
30 31 32 |
# File 'lib/gitti/base.rb', line 30 def name @name end |
#owner ⇒ Object (readonly)
Returns the value of attribute owner.
30 31 32 |
# File 'lib/gitti/base.rb', line 30 def owner @owner end |
Instance Method Details
#http_clone_url ⇒ Object
use clone_url( http: true ) – why? why not?
44 45 46 47 |
# File 'lib/gitti/base.rb', line 44 def http_clone_url ## use clone_url( http: true ) -- why? why not? ## note: https is default for github - http:// gets redirected to https:// "http://github.com/#{@owner}/#{@name}" end |
#https_clone_url ⇒ Object
49 50 51 |
# File 'lib/gitti/base.rb', line 49 def https_clone_url "https://github.com/#{@owner}/#{@name}" end |
#ssh_clone_url ⇒ Object
38 39 40 41 42 |
# File 'lib/gitti/base.rb', line 38 def ssh_clone_url ## check: use https: as default? for github - http:// still supported? or redirected? ## "http://github.com/#{@owner}/#{@name}" "[email protected]:#{@owner}/#{@name}.git" end |