Class: Saklient::Cloud::Enums::EAvailability
- Inherits:
-
Object
- Object
- Saklient::Cloud::Enums::EAvailability
- Defined in:
- lib/saklient/cloud/enums/eavailability.rb
Overview
リソースの有効性を表す列挙子.
Constant Summary collapse
- @@_map =
{ selectable:69, migrating:70, precreate:71, replicating:72, transfering:73, stopped:75, failed:78, charged:79, uploading:80, available:100 }
Class Method Summary collapse
- .available ⇒ Object
- .charged ⇒ Object
- .compare(lhs, rhs) ⇒ Object
- .failed ⇒ Object
- .migrating ⇒ Object
- .precreate ⇒ Object
- .replicating ⇒ Object
- .selectable ⇒ Object
- .stopped ⇒ Object
- .transfering ⇒ Object
- .uploading ⇒ Object
Class Method Details
.available ⇒ Object
48 49 50 |
# File 'lib/saklient/cloud/enums/eavailability.rb', line 48 def self.available 'available' end |
.charged ⇒ Object
40 41 42 |
# File 'lib/saklient/cloud/enums/eavailability.rb', line 40 def self.charged 'charged' end |
.compare(lhs, rhs) ⇒ Object
53 54 55 56 57 58 59 60 |
# File 'lib/saklient/cloud/enums/eavailability.rb', line 53 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 |
.failed ⇒ Object
36 37 38 |
# File 'lib/saklient/cloud/enums/eavailability.rb', line 36 def self.failed 'failed' end |
.migrating ⇒ Object
16 17 18 |
# File 'lib/saklient/cloud/enums/eavailability.rb', line 16 def self. 'migrating' end |
.precreate ⇒ Object
20 21 22 |
# File 'lib/saklient/cloud/enums/eavailability.rb', line 20 def self.precreate 'precreate' end |
.replicating ⇒ Object
24 25 26 |
# File 'lib/saklient/cloud/enums/eavailability.rb', line 24 def self.replicating 'replicating' end |
.selectable ⇒ Object
12 13 14 |
# File 'lib/saklient/cloud/enums/eavailability.rb', line 12 def self.selectable 'selectable' end |
.stopped ⇒ Object
32 33 34 |
# File 'lib/saklient/cloud/enums/eavailability.rb', line 32 def self.stopped 'stopped' end |
.transfering ⇒ Object
28 29 30 |
# File 'lib/saklient/cloud/enums/eavailability.rb', line 28 def self.transfering 'transfering' end |
.uploading ⇒ Object
44 45 46 |
# File 'lib/saklient/cloud/enums/eavailability.rb', line 44 def self.uploading 'uploading' end |