Class: EC2Launcher::DSL::BlockDevice
- Inherits:
-
Object
- Object
- EC2Launcher::DSL::BlockDevice
- Defined in:
- lib/ec2launcher/dsl/block_device.rb
Instance Attribute Summary collapse
-
#mount_point ⇒ Object
readonly
Returns the value of attribute mount_point.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize ⇒ BlockDevice
constructor
A new instance of BlockDevice.
- #is_raid? ⇒ Boolean
- #to_json(*a) ⇒ Object
Constructor Details
#initialize ⇒ BlockDevice
Returns a new instance of BlockDevice.
20 21 22 23 24 |
# File 'lib/ec2launcher/dsl/block_device.rb', line 20 def initialize() @count = 1 @group = "root" @user = "root" end |
Instance Attribute Details
#mount_point ⇒ Object (readonly)
Returns the value of attribute mount_point.
9 10 11 |
# File 'lib/ec2launcher/dsl/block_device.rb', line 9 def mount_point @mount_point end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
10 11 12 |
# File 'lib/ec2launcher/dsl/block_device.rb', line 10 def name @name end |
Instance Method Details
#is_raid? ⇒ Boolean
26 27 28 |
# File 'lib/ec2launcher/dsl/block_device.rb', line 26 def is_raid?() @raid_level.nil? end |
#to_json(*a) ⇒ Object
30 31 32 33 34 35 36 37 38 39 |
# File 'lib/ec2launcher/dsl/block_device.rb', line 30 def to_json(*a) { "name" => @name, "count" => @count, "raid_level" => @raid_level, "mount_point" => @mount, "owner" => @owner, "group" => @group }.to_json(*a) end |