Class: Shaddox::Repo
- Inherits:
-
Object
- Object
- Shaddox::Repo
- Defined in:
- lib/shaddox/repo.rb
Instance Attribute Summary collapse
-
#branch ⇒ Object
readonly
Returns the value of attribute branch.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
-
#vcs ⇒ Object
readonly
Returns the value of attribute vcs.
Instance Method Summary collapse
-
#initialize(info) ⇒ Repo
constructor
A new instance of Repo.
- #to_source ⇒ Object
Constructor Details
#initialize(info) ⇒ Repo
Returns a new instance of Repo.
4 5 6 7 8 9 |
# File 'lib/shaddox/repo.rb', line 4 def initialize(info) @info = info @url = info[:url] @branch = info[:branch] || 'master' @vcs = info[:vcs] || :git end |
Instance Attribute Details
#branch ⇒ Object (readonly)
Returns the value of attribute branch.
3 4 5 |
# File 'lib/shaddox/repo.rb', line 3 def branch @branch end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
3 4 5 |
# File 'lib/shaddox/repo.rb', line 3 def url @url end |
#vcs ⇒ Object (readonly)
Returns the value of attribute vcs.
3 4 5 |
# File 'lib/shaddox/repo.rb', line 3 def vcs @vcs end |
Instance Method Details
#to_source ⇒ Object
11 12 13 |
# File 'lib/shaddox/repo.rb', line 11 def to_source "Shaddox::Repo.new(#{@info.inspect})" end |