Class: Svnx::Action

Inherits:
Object
  • Object
show all
Includes:
Comparable, Logue::Loggable
Defined in:
lib/svnx/base/action.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type) ⇒ Action

Returns a new instance of Action.



15
16
17
18
19
20
# File 'lib/svnx/base/action.rb', line 15

def initialize type
  sas = ActionStatus.instance
  unless @type = sas.symbol_for(type)
    raise "not a valid action type: #{type}"
  end
end

Instance Attribute Details

#typeObject (readonly)

Returns the value of attribute type.



13
14
15
# File 'lib/svnx/base/action.rb', line 13

def type
  @type
end

Instance Method Details

#<=>(other) ⇒ Object



22
23
24
# File 'lib/svnx/base/action.rb', line 22

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

#to_sObject



26
27
28
# File 'lib/svnx/base/action.rb', line 26

def to_s
  @type.to_s
end