Class: AgileNotifier::SCM
- Inherits:
-
Object
- Object
- AgileNotifier::SCM
- Defined in:
- lib/agile_notifier/scm.rb
Defined Under Namespace
Classes: Repository
Instance Attribute Summary collapse
-
#args ⇒ Object
Returns the value of attribute args.
-
#repositories ⇒ Object
Returns the value of attribute repositories.
-
#url ⇒ Object
Returns the value of attribute url.
Instance Method Summary collapse
- #add_repository(repository) ⇒ Object
-
#initialize(url, args = {}) ⇒ SCM
constructor
A new instance of SCM.
- #repository ⇒ Object
Constructor Details
#initialize(url, args = {}) ⇒ SCM
Returns a new instance of SCM.
5 6 7 8 9 |
# File 'lib/agile_notifier/scm.rb', line 5 def initialize(url, args = {}) @url = url @repositories = [] @args = args end |
Instance Attribute Details
#args ⇒ Object
Returns the value of attribute args.
3 4 5 |
# File 'lib/agile_notifier/scm.rb', line 3 def args @args end |
#repositories ⇒ Object
Returns the value of attribute repositories.
3 4 5 |
# File 'lib/agile_notifier/scm.rb', line 3 def repositories @repositories end |
#url ⇒ Object
Returns the value of attribute url.
3 4 5 |
# File 'lib/agile_notifier/scm.rb', line 3 def url @url end |
Instance Method Details
#add_repository(repository) ⇒ Object
11 12 13 |
# File 'lib/agile_notifier/scm.rb', line 11 def add_repository(repository) @repositories.push(repository) end |
#repository ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/agile_notifier/scm.rb', line 15 def repository if @repositories.size == 1 return @repositories.first else raise('There are more than one repository, please use method [repositories] instead of [repository]') end end |