Class: PgBundle::GithubSource
- Inherits:
-
BaseSource
- Object
- BaseSource
- PgBundle::GithubSource
- Defined in:
- lib/pgbundle/github_source.rb
Overview
The GithubSource class defines a Github Source
Instance Attribute Summary collapse
-
#branch ⇒ Object
readonly
Returns the value of attribute branch.
Attributes inherited from BaseSource
Instance Method Summary collapse
-
#initialize(path, branch = 'master') ⇒ GithubSource
constructor
A new instance of GithubSource.
- #load(host, user, dest) ⇒ Object
Constructor Details
#initialize(path, branch = 'master') ⇒ GithubSource
Returns a new instance of GithubSource.
7 8 9 10 |
# File 'lib/pgbundle/github_source.rb', line 7 def initialize(path, branch = 'master') @branch = branch super(path) end |
Instance Attribute Details
#branch ⇒ Object (readonly)
Returns the value of attribute branch.
5 6 7 |
# File 'lib/pgbundle/github_source.rb', line 5 def branch @branch end |
Instance Method Details
#load(host, user, dest) ⇒ Object
12 13 14 15 16 17 18 19 |
# File 'lib/pgbundle/github_source.rb', line 12 def load(host, user, dest) clone(dest) if host == 'localhost' copy_local(clone_dir, dest) else copy_to_remote(host, user, clone_dir, dest) end end |