Class: SVN::Stat
- Inherits:
-
Object
- Object
- SVN::Stat
- Defined in:
- lib/svn_stat.rb
Instance Attribute Summary collapse
-
#event ⇒ Object
readonly
Returns the value of attribute event.
-
#repository_path ⇒ Object
readonly
Returns the value of attribute repository_path.
-
#revision_number ⇒ Object
readonly
Returns the value of attribute revision_number.
Instance Method Summary collapse
- #author ⇒ Object
- #date ⇒ Object
- #files ⇒ Object
-
#initialize(repository_path, revision_number = nil) ⇒ Stat
constructor
A new instance of Stat.
- #message ⇒ Object
Constructor Details
#initialize(repository_path, revision_number = nil) ⇒ Stat
Returns a new instance of Stat.
7 8 9 10 11 12 13 |
# File 'lib/svn_stat.rb', line 7 def initialize repository_path, revision_number = nil @revision = revision_number @repository_path = repository_path @event = SVN_EVENT @svnlook_path = `which svnlook`.chomp end |
Instance Attribute Details
#event ⇒ Object (readonly)
Returns the value of attribute event.
5 6 7 |
# File 'lib/svn_stat.rb', line 5 def event @event end |
#repository_path ⇒ Object (readonly)
Returns the value of attribute repository_path.
5 6 7 |
# File 'lib/svn_stat.rb', line 5 def repository_path @repository_path end |
#revision_number ⇒ Object (readonly)
Returns the value of attribute revision_number.
5 6 7 |
# File 'lib/svn_stat.rb', line 5 def revision_number @revision_number end |
Instance Method Details
#author ⇒ Object
15 16 17 |
# File 'lib/svn_stat.rb', line 15 def @author ||= svnlook "author" end |
#date ⇒ Object
23 24 25 |
# File 'lib/svn_stat.rb', line 23 def date @date ||= Date.parse(svnlook("date")) end |
#files ⇒ Object
27 28 29 30 31 32 33 34 |
# File 'lib/svn_stat.rb', line 27 def files unless @files @files = [] svnlook('changed').each_line{|l| @files << SVN::FileStat.parse(l)} end @files end |
#message ⇒ Object
19 20 21 |
# File 'lib/svn_stat.rb', line 19 def @message ||= svnlook "cat" end |