Class: PVN::Diff::Change

Inherits:
Object
  • Object
show all
Includes:
Logue::Loggable
Defined in:
lib/pvn/diff/change.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(revision, action) ⇒ Change

Returns a new instance of Change.



17
18
19
20
# File 'lib/pvn/diff/change.rb', line 17

def initialize revision, action
  @revision = to_revision(revision)
  @action = action.kind_of?(SVNx::Action) ? action : SVNx::Action.new(action)
end

Instance Attribute Details

#actionObject (readonly)

Returns the value of attribute action.



15
16
17
# File 'lib/pvn/diff/change.rb', line 15

def action
  @action
end

#revisionObject (readonly)

Returns the value of attribute revision.



14
15
16
# File 'lib/pvn/diff/change.rb', line 14

def revision
  @revision
end

Instance Method Details

#to_revision(rev) ⇒ Object



22
23
24
25
26
# File 'lib/pvn/diff/change.rb', line 22

def to_revision rev
  # or should we convert this to Revision::Argument, and @revisions is
  # Revision::Range?
  rev.kind_of?(Fixnum) ? rev.to_s : rev
end