Class: Modification

Inherits:
Object
  • Object
show all
Defined in:
lib/svn_log/modification.rb

Constant Summary collapse

ADD =
'A'
DELETE =
'D'
MODIFY =
'M'

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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

#pathObject (readonly)

Returns the value of attribute path.



9
10
11
# File 'lib/svn_log/modification.rb', line 9

def path
  @path
end

#typeObject (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