Class: SVNx::Revision::Argument

Inherits:
Object
  • Object
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.

Direct Known Subclasses

IndexArgument, StringArgument

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value) ⇒ Argument

Returns a new instance of Argument.



36
37
38
# File 'lib/svnx/revision/argument.rb', line 36

def initialize value
  @value = value
end

Instance Attribute Details

#valueObject (readonly)

these are also valid revisions :working_copy :head



28
29
30
# File 'lib/svnx/revision/argument.rb', line 28

def value
  @value
end

Class Method Details

.create(value, args = Hash.new) ⇒ Object



31
32
33
# File 'lib/svnx/revision/argument.rb', line 31

def create value, args = Hash.new
  ArgumentFactory.new.create value, args
end

Instance Method Details

#<=>(other) ⇒ Object



44
45
46
# File 'lib/svnx/revision/argument.rb', line 44

def <=> other
  @value <=> other.value
end

#to_sObject



40
41
42
# File 'lib/svnx/revision/argument.rb', line 40

def to_s
  @value.to_s
end