Class: VpsAdminOS::Converter::Devices::Device
- Inherits:
-
Object
- Object
- VpsAdminOS::Converter::Devices::Device
- Defined in:
- lib/vpsadminos-converter/devices.rb
Instance Attribute Summary collapse
-
#inherit ⇒ Object
Returns the value of attribute inherit.
-
#major ⇒ Object
Returns the value of attribute major.
-
#minor ⇒ Object
Returns the value of attribute minor.
-
#mode ⇒ Object
Returns the value of attribute mode.
-
#name ⇒ Object
Returns the value of attribute name.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
- #dump ⇒ Object
-
#initialize(type, major, minor, mode, opts = {}) ⇒ Device
constructor
A new instance of Device.
Constructor Details
#initialize(type, major, minor, mode, opts = {}) ⇒ Device
Returns a new instance of Device.
13 14 15 16 17 18 19 20 |
# File 'lib/vpsadminos-converter/devices.rb', line 13 def initialize(type, major, minor, mode, opts = {}) @type = type @major = major @minor = minor @mode = mode @name = opts[:name] @inherit = opts.has_key?(:inherit) ? opts[:inherit] : true end |
Instance Attribute Details
#inherit ⇒ Object
Returns the value of attribute inherit.
4 5 6 |
# File 'lib/vpsadminos-converter/devices.rb', line 4 def inherit @inherit end |
#major ⇒ Object
Returns the value of attribute major.
4 5 6 |
# File 'lib/vpsadminos-converter/devices.rb', line 4 def major @major end |
#minor ⇒ Object
Returns the value of attribute minor.
4 5 6 |
# File 'lib/vpsadminos-converter/devices.rb', line 4 def minor @minor end |
#mode ⇒ Object
Returns the value of attribute mode.
4 5 6 |
# File 'lib/vpsadminos-converter/devices.rb', line 4 def mode @mode end |
#name ⇒ Object
Returns the value of attribute name.
4 5 6 |
# File 'lib/vpsadminos-converter/devices.rb', line 4 def name @name end |
#type ⇒ Object
Returns the value of attribute type.
4 5 6 |
# File 'lib/vpsadminos-converter/devices.rb', line 4 def type @type end |
Instance Method Details
#dump ⇒ Object
22 23 24 25 26 27 28 29 30 31 |
# File 'lib/vpsadminos-converter/devices.rb', line 22 def dump { 'type' => type, 'major' => major, 'minor' => minor, 'mode' => mode, 'name' => name, 'inherit' => inherit } end |