Class: PVN::RevisionOption
- Inherits:
-
BaseRevisionOption
- Object
- Synoption::Option
- BaseRevisionOption
- PVN::RevisionOption
- Defined in:
- lib/pvn/revision/revision_option.rb
Direct Known Subclasses
Constant Summary
Constants inherited from BaseRevisionOption
BaseRevisionOption::REVISION_DESCRIPTION
Instance Attribute Summary collapse
-
#fromdate ⇒ Object
Returns the value of attribute fromdate.
-
#todate ⇒ Object
Returns the value of attribute todate.
Instance Method Summary collapse
- #description ⇒ Object
-
#initialize(revargs = Hash.new) ⇒ RevisionOption
constructor
A new instance of RevisionOption.
- #to_svn_revision_date(date) ⇒ Object
- #value ⇒ Object
Methods inherited from BaseRevisionOption
#entry, #head?, #relative_to_absolute, #resolve_value, #run_log_command
Constructor Details
#initialize(revargs = Hash.new) ⇒ RevisionOption
Returns a new instance of RevisionOption.
11 12 13 14 15 |
# File 'lib/pvn/revision/revision_option.rb', line 11 def initialize revargs = Hash.new @fromdate = nil @todate = nil super :revision, '-r', description, nil, revargs end |
Instance Attribute Details
#fromdate ⇒ Object
Returns the value of attribute fromdate.
8 9 10 |
# File 'lib/pvn/revision/revision_option.rb', line 8 def fromdate @fromdate end |
#todate ⇒ Object
Returns the value of attribute todate.
9 10 11 |
# File 'lib/pvn/revision/revision_option.rb', line 9 def todate @todate end |
Instance Method Details
#description ⇒ Object
17 18 19 |
# File 'lib/pvn/revision/revision_option.rb', line 17 def description REVISION_DESCRIPTION end |
#to_svn_revision_date(date) ⇒ Object
21 22 23 |
# File 'lib/pvn/revision/revision_option.rb', line 21 def to_svn_revision_date date '{' + date.to_s + '}' end |
#value ⇒ Object
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/pvn/revision/revision_option.rb', line 25 def value val = nil if @fromdate val = to_svn_revision_date @fromdate end if @todate val = val ? val + ':' : '' val += to_svn_revision_date @todate end if val val else super end end |