Class: Svnx::Revision::DateToDate

Inherits:
Object
  • Object
show all
Defined in:
lib/svnx/revision/date.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#fromObject (readonly)

Returns the value of attribute from.



11
12
13
# File 'lib/svnx/revision/date.rb', line 11

def from
  @from
end

#toObject (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_strObject



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