Class: SVNx::Revision::Argument
- Inherits:
-
Object
- Object
- SVNx::Revision::Argument
show all
- Includes:
- Comparable, Logue::Loggable
- Defined in:
- lib/svnx/revision/argument.rb
Overview
-n means to count from the end of the list. +n means to count from the beginning of the list.
n means the literal revision number.
Constant Summary
collapse
- DATE_REGEXP =
Regexp.new '^\{(.*?)\}'
- SVN_ARGUMENT_WORDS =
%w{ HEAD BASE COMMITTED PREV }
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
these are also valid revisions :working_copy :head.
Class Method Summary
collapse
Instance Method Summary
collapse
Constructor Details
#initialize(value) ⇒ Argument
Returns a new instance of Argument.
71
72
73
|
# File 'lib/svnx/revision/argument.rb', line 71
def initialize value
@value = value
end
|
Instance Attribute Details
#value ⇒ Object
these are also valid revisions :working_copy :head
30
31
32
|
# File 'lib/svnx/revision/argument.rb', line 30
def value
@value
end
|
Class Method Details
.matches_relative?(str) ⇒ Boolean
66
67
68
|
# File 'lib/svnx/revision/argument.rb', line 66
def matches_relative? str
RELATIVE_REVISION_RE.match str
end
|
.new(value, args = Hash.new) ⇒ Object
.orig_new ⇒ Object
33
|
# File 'lib/svnx/revision/argument.rb', line 33
alias_method :orig_new, :new
|
Instance Method Details
#<=>(other) ⇒ Object
79
80
81
|
# File 'lib/svnx/revision/argument.rb', line 79
def <=> other
@value <=> other.value
end
|
#to_s ⇒ Object
75
76
77
|
# File 'lib/svnx/revision/argument.rb', line 75
def to_s
@value.to_s
end
|