Class: Modification
- Inherits:
-
Object
- Object
- Modification
- Defined in:
- lib/svn_log/modification.rb
Constant Summary collapse
- ADD =
'A'
- DELETE =
'D'
- MODIFY =
'M'
Instance Attribute Summary collapse
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Class Method Summary collapse
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(type, path) ⇒ Modification
constructor
A new instance of Modification.
Constructor Details
#initialize(type, path) ⇒ Modification
Returns a new instance of Modification.
11 12 13 14 |
# File 'lib/svn_log/modification.rb', line 11 def initialize(type, path) @type=type @path=path end |
Instance Attribute Details
#path ⇒ Object (readonly)
Returns the value of attribute path.
9 10 11 |
# File 'lib/svn_log/modification.rb', line 9 def path @path end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
8 9 10 |
# File 'lib/svn_log/modification.rb', line 8 def type @type end |
Class Method Details
.parse(path) ⇒ Object
16 17 18 |
# File 'lib/svn_log/modification.rb', line 16 def self.parse(path) Modification.new(path.attribute('action').value, path.text) end |
Instance Method Details
#==(other) ⇒ Object
20 21 22 23 |
# File 'lib/svn_log/modification.rb', line 20 def ==(other) @type == other.type && @path == other.path end |