Class: SVNx::Action
- Inherits:
-
Object
- Object
- SVNx::Action
- Includes:
- Comparable, Logue::Loggable
- Defined in:
- lib/svnx/action.rb
Constant Summary collapse
- STATUS_TO_TYPE =
Hash.new
Instance Attribute Summary collapse
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Class Method Summary collapse
Instance Method Summary collapse
- #<=>(other) ⇒ Object
-
#initialize(str) ⇒ Action
constructor
A new instance of Action.
- #to_s ⇒ Object
Constructor Details
#initialize(str) ⇒ Action
Returns a new instance of Action.
36 37 38 |
# File 'lib/svnx/action.rb', line 36 def initialize str @type = STATUS_TO_TYPE[str] end |
Instance Attribute Details
#type ⇒ Object (readonly)
Returns the value of attribute type.
12 13 14 |
# File 'lib/svnx/action.rb', line 12 def type @type end |
Class Method Details
.add_type(sym, str, char) ⇒ Object
16 17 18 19 20 |
# File 'lib/svnx/action.rb', line 16 def self.add_type sym, str, char [ sym, str, char ].each do |key| STATUS_TO_TYPE[key] = sym end end |
Instance Method Details
#<=>(other) ⇒ Object
40 41 42 |
# File 'lib/svnx/action.rb', line 40 def <=> other @type.to_s <=> other.type.to_s end |
#to_s ⇒ Object
44 45 46 |
# File 'lib/svnx/action.rb', line 44 def to_s @type.to_s end |