Class: Virt::Interface
- Inherits:
-
Object
- Object
- Virt::Interface
- Defined in:
- lib/virt/interface.rb
Direct Known Subclasses
Instance Attribute Summary (collapse)
-
- (Object) device
Returns the value of attribute device.
-
- (Object) mac
Returns the value of attribute mac.
-
- (Object) model
Returns the value of attribute model.
-
- (Object) network
Returns the value of attribute network.
-
- (Object) type
Returns the value of attribute type.
Instance Method Summary (collapse)
-
- (Interface) initialize(options = {})
constructor
A new instance of Interface.
- - (Boolean) new?
Constructor Details
- (Interface) initialize(options = {})
A new instance of Interface
5 6 7 8 9 10 11 12 |
# File 'lib/virt/interface.rb', line 5 def initialize = {} @connection = Virt.connection @device = [:device] || default_device @type = [:type] || default_type @model = [:model] || default_model @mac = [:mac] @network = [:network] end |
Instance Attribute Details
- (Object) device
Returns the value of attribute device
3 4 5 |
# File 'lib/virt/interface.rb', line 3 def device @device end |
- (Object) mac
Returns the value of attribute mac
3 4 5 |
# File 'lib/virt/interface.rb', line 3 def mac @mac end |
- (Object) model
Returns the value of attribute model
3 4 5 |
# File 'lib/virt/interface.rb', line 3 def model @model end |
- (Object) network
Returns the value of attribute network
3 4 5 |
# File 'lib/virt/interface.rb', line 3 def network @network end |
- (Object) type
Returns the value of attribute type
3 4 5 |
# File 'lib/virt/interface.rb', line 3 def type @type end |
Instance Method Details
- (Boolean) new?
14 15 16 |
# File 'lib/virt/interface.rb', line 14 def new? mac.nil? end |