Class: SVN::FileStat
- Inherits:
-
Object
- Object
- SVN::FileStat
- Defined in:
- lib/svn_file_stat.rb
Instance Attribute Summary collapse
-
#file_flag ⇒ Object
readonly
Returns the value of attribute file_flag.
-
#history_flag ⇒ Object
readonly
Returns the value of attribute history_flag.
-
#lock_flag ⇒ Object
readonly
Returns the value of attribute lock_flag.
-
#meta_flag ⇒ Object
readonly
Returns the value of attribute meta_flag.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Instance Method Summary collapse
-
#initialize(line) ⇒ FileStat
constructor
A new instance of FileStat.
- #modified? ⇒ Boolean
- #to_s ⇒ Object
Constructor Details
#initialize(line) ⇒ FileStat
Returns a new instance of FileStat.
16 17 18 19 20 21 22 |
# File 'lib/svn_file_stat.rb', line 16 def initialize line @file_flag = SVN::FLAGS[line[0,1]] @meta_flag = SVN::FLAGS[line[1,1]] @lock_flag = SVN::FLAGS[line[2,1]] == 'L' @history_flag = SVN::FLAGS[line[3,1]] == '+' @path = line[4..-1] end |
Instance Attribute Details
#file_flag ⇒ Object (readonly)
Returns the value of attribute file_flag.
14 15 16 |
# File 'lib/svn_file_stat.rb', line 14 def file_flag @file_flag end |
#history_flag ⇒ Object (readonly)
Returns the value of attribute history_flag.
14 15 16 |
# File 'lib/svn_file_stat.rb', line 14 def history_flag @history_flag end |
#lock_flag ⇒ Object (readonly)
Returns the value of attribute lock_flag.
14 15 16 |
# File 'lib/svn_file_stat.rb', line 14 def lock_flag @lock_flag end |
#meta_flag ⇒ Object (readonly)
Returns the value of attribute meta_flag.
14 15 16 |
# File 'lib/svn_file_stat.rb', line 14 def @meta_flag end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
14 15 16 |
# File 'lib/svn_file_stat.rb', line 14 def path @path end |
Instance Method Details
#modified? ⇒ Boolean
28 29 30 |
# File 'lib/svn_file_stat.rb', line 28 def modified? [:merged, :updated, :modified, :replaced].find{|a| a == @file_flag} end |
#to_s ⇒ Object
24 25 26 |
# File 'lib/svn_file_stat.rb', line 24 def to_s @path end |