Class: Penchant::Repo
- Inherits:
-
Object
- Object
- Penchant::Repo
- Defined in:
- lib/penchant/repo.rb
Instance Method Summary collapse
- #clone_to(dir) ⇒ Object
-
#initialize(url) ⇒ Repo
constructor
A new instance of Repo.
- #to_s ⇒ Object
Constructor Details
#initialize(url) ⇒ Repo
Returns a new instance of Repo.
3 4 5 |
# File 'lib/penchant/repo.rb', line 3 def initialize(url) @url = url end |
Instance Method Details
#clone_to(dir) ⇒ Object
7 8 9 10 11 |
# File 'lib/penchant/repo.rb', line 7 def clone_to(dir) Dir.chdir(dir) do system %{git clone #{@url}} end end |
#to_s ⇒ Object
13 |
# File 'lib/penchant/repo.rb', line 13 def to_s ; @url ; end |