Class: SVNCampfireNotifier::Project
- Inherits:
-
Object
- Object
- SVNCampfireNotifier::Project
- Defined in:
- lib/svn_campfire_notifier/project.rb
Instance Attribute Summary collapse
-
#repository_path ⇒ Object
readonly
Returns the value of attribute repository_path.
-
#revision ⇒ Object
readonly
Returns the value of attribute revision.
Instance Method Summary collapse
- #author ⇒ Object
- #changed ⇒ Object
-
#initialize(repository_path, revision) ⇒ Project
constructor
A new instance of Project.
- #log ⇒ Object
- #name ⇒ Object
Constructor Details
#initialize(repository_path, revision) ⇒ Project
Returns a new instance of Project.
5 6 7 8 |
# File 'lib/svn_campfire_notifier/project.rb', line 5 def initialize(repository_path, revision) @repository_path = repository_path @revision = revision.to_i end |
Instance Attribute Details
#repository_path ⇒ Object (readonly)
Returns the value of attribute repository_path.
3 4 5 |
# File 'lib/svn_campfire_notifier/project.rb', line 3 def repository_path @repository_path end |
#revision ⇒ Object (readonly)
Returns the value of attribute revision.
3 4 5 |
# File 'lib/svn_campfire_notifier/project.rb', line 3 def revision @revision end |
Instance Method Details
#author ⇒ Object
14 15 16 |
# File 'lib/svn_campfire_notifier/project.rb', line 14 def @author ||= `svnlook author -r #{revision} #{repository_path}`.strip end |
#changed ⇒ Object
18 19 20 |
# File 'lib/svn_campfire_notifier/project.rb', line 18 def changed @changes ||= `svnlook changed -r #{revision} #{repository_path}`.strip end |
#log ⇒ Object
22 23 24 |
# File 'lib/svn_campfire_notifier/project.rb', line 22 def log @log ||= `svnlook log -r #{revision} #{repository_path}`.strip end |
#name ⇒ Object
10 11 12 |
# File 'lib/svn_campfire_notifier/project.rb', line 10 def name @repository_path.split('/').last end |