Class: PVN::RevisionOption
- Inherits:
-
BaseRevisionOption
- Object
- BaseOption
- Option
- BaseRevisionOption
- PVN::RevisionOption
- Defined in:
- lib/pvn/revision/revision_option.rb
Direct Known Subclasses
Constant Summary
Constants inherited from BaseRevisionOption
BaseRevisionOption::REVISION_DESCRIPTION
Constants inherited from BaseOption
Instance Attribute Summary collapse
-
#fromdate ⇒ Object
Returns the value of attribute fromdate.
-
#todate ⇒ Object
Returns the value of attribute todate.
Attributes inherited from BaseOption
#default, #description, #name, #negate, #regexp, #tag
Instance Method Summary collapse
-
#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
Methods inherited from BaseOption
#exact_match?, #negative_match?, #next_argument, #post_process, #process, #regexp_match?, #resolve_value, #set_value, #takes_value?, #to_command_line, #to_doc, #to_s, #unset
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', REVISION_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
#to_svn_revision_date(date) ⇒ Object
17 18 19 |
# File 'lib/pvn/revision/revision_option.rb', line 17 def to_svn_revision_date date '{' + date.to_s + '}' end |
#value ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/pvn/revision/revision_option.rb', line 21 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 |