Class: EC2::Platform::PartitionType

Inherits:
String
  • Object
show all
Defined in:
lib/ec2/platform/base.rb

Constant Summary collapse

MBR =
new 'mbr'
GPT =
new 'gpt'
NONE =
new 'none'

Class Method Summary collapse

Class Method Details

.listObject



19
20
21
# File 'lib/ec2/platform/base.rb', line 19

def self.list()
  [MBR, GPT, NONE]
end

.valid?(input) ⇒ Boolean

Returns:

  • (Boolean)


23
24
25
26
# File 'lib/ec2/platform/base.rb', line 23

def self.valid?(input)
  return false if input == NONE
  self.list.include?(input)
end