Class: Svnx::Revision::DateToDate
- Inherits:
-
Object
- Object
- Svnx::Revision::DateToDate
- Defined in:
- lib/svnx/revision/date.rb
Instance Attribute Summary collapse
-
#from ⇒ Object
readonly
Returns the value of attribute from.
-
#to ⇒ Object
readonly
Returns the value of attribute to.
Instance Method Summary collapse
-
#initialize(from, to) ⇒ DateToDate
constructor
A new instance of DateToDate.
- #to_svn_date(date) ⇒ Object
- #to_svn_str ⇒ Object
Constructor Details
#initialize(from, to) ⇒ DateToDate
Returns a new instance of DateToDate.
14 15 16 17 |
# File 'lib/svnx/revision/date.rb', line 14 def initialize from, to @from = from @to = to end |
Instance Attribute Details
#from ⇒ Object (readonly)
Returns the value of attribute from.
11 12 13 |
# File 'lib/svnx/revision/date.rb', line 11 def from @from end |
#to ⇒ Object (readonly)
Returns the value of attribute to.
12 13 14 |
# File 'lib/svnx/revision/date.rb', line 12 def to @to end |
Instance Method Details
#to_svn_date(date) ⇒ Object
23 24 25 |
# File 'lib/svnx/revision/date.rb', line 23 def to_svn_date date date.strftime "%Y-%m-%d" end |
#to_svn_str ⇒ Object
19 20 21 |
# File 'lib/svnx/revision/date.rb', line 19 def to_svn_str [ @from, @to ].collect { |dt| "{" + to_svn_date(dt) + "}" }.join(":") end |