Class: Saklient::Cloud::Enums::EScriptClass
- Inherits:
-
Object
- Object
- Saklient::Cloud::Enums::EScriptClass
- Defined in:
- lib/saklient/cloud/enums/escript_class.rb
Overview
スクリプトのクラスを表す列挙子.
Constant Summary collapse
- @@_map =
{ shell:200, ansible:300 }
Class Method Summary collapse
Class Method Details
.ansible ⇒ Object
16 17 18 |
# File 'lib/saklient/cloud/enums/escript_class.rb', line 16 def self.ansible 'ansible' end |
.compare(lhs, rhs) ⇒ Object
21 22 23 24 25 26 27 28 |
# File 'lib/saklient/cloud/enums/escript_class.rb', line 21 def self.compare(lhs, rhs) return nil if lhs.nil? || rhs.nil? l = @@_map[lhs.to_sym] r = @@_map[rhs.to_sym] return nil if l.nil? || r.nil? ret = l - r 0 < ret ? 1 : (ret < 0 ? -1 : 0) end |
.shell ⇒ Object
12 13 14 |
# File 'lib/saklient/cloud/enums/escript_class.rb', line 12 def self.shell 'shell' end |