Class: Virt::Interface
- Inherits:
-
Object
- Object
- Virt::Interface
- Defined in:
- lib/virt/interface.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#device ⇒ Object
Returns the value of attribute device.
-
#mac ⇒ Object
Returns the value of attribute mac.
-
#model ⇒ Object
Returns the value of attribute model.
-
#network ⇒ Object
Returns the value of attribute network.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Interface
constructor
A new instance of Interface.
- #new? ⇒ Boolean
Constructor Details
#initialize(options = {}) ⇒ Interface
Returns 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
#device ⇒ Object
Returns the value of attribute device.
3 4 5 |
# File 'lib/virt/interface.rb', line 3 def device @device end |
#mac ⇒ Object
Returns the value of attribute mac.
3 4 5 |
# File 'lib/virt/interface.rb', line 3 def mac @mac end |
#model ⇒ Object
Returns the value of attribute model.
3 4 5 |
# File 'lib/virt/interface.rb', line 3 def model @model end |
#network ⇒ Object
Returns the value of attribute network.
3 4 5 |
# File 'lib/virt/interface.rb', line 3 def network @network end |
#type ⇒ Object
Returns the value of attribute type.
3 4 5 |
# File 'lib/virt/interface.rb', line 3 def type @type end |
Instance Method Details
#new? ⇒ Boolean
14 15 16 |
# File 'lib/virt/interface.rb', line 14 def new? mac.nil? end |