Class: PVN::Diff::Change
- Inherits:
-
Object
- Object
- PVN::Diff::Change
- Includes:
- Logue::Loggable
- Defined in:
- lib/pvn/diff/change.rb
Instance Attribute Summary collapse
-
#action ⇒ Object
readonly
Returns the value of attribute action.
-
#revision ⇒ Object
readonly
Returns the value of attribute revision.
Instance Method Summary collapse
-
#initialize(revision, action) ⇒ Change
constructor
A new instance of Change.
- #to_revision(rev) ⇒ Object
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
#action ⇒ Object (readonly)
Returns the value of attribute action.
15 16 17 |
# File 'lib/pvn/diff/change.rb', line 15 def action @action end |
#revision ⇒ Object (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 |