class Svnx::Action

Attributes

abbrev[R]
type[R]

Public Class Methods

new(*args) click to toggle source
Calls superclass method
# File lib/svnx/base/action.rb, line 9
def new *args
  if args.length == 2
    super
  else
    type = args.first
    types = constants false
    types.each do |t|
      tc = const_get t
      if tc.type == type.to_sym || tc.abbrev == type
        return tc
      end
    end
    raise "not a valid action type: #{type}"
  end
end
new(type, abbrev) click to toggle source
# File lib/svnx/base/action.rb, line 29
def initialize type, abbrev
  @type = type.to_sym
  @abbrev = abbrev
end

Public Instance Methods

<=>(other) click to toggle source
# File lib/svnx/base/action.rb, line 34
def <=> other
  @type <=> other.type
end
to_s() click to toggle source
# File lib/svnx/base/action.rb, line 38
def to_s
  @type.to_s
end