Class: Libvirt::Collection::AbstractCollection
- Inherits:
-
Object
- Object
- Libvirt::Collection::AbstractCollection
- Extended by:
- Forwardable
- Includes:
- Enumerable
- Defined in:
- lib/libvirt/collection/abstract_collection.rb
Overview
Abstract parent class for all collections within libvirt.
Subclasses of any collection are expected to implement the function
all which returns all results of a collection. This will automatically
make the enumerability work as well as some methods such as
first and length.
Direct Known Subclasses
DomainCollection, InterfaceCollection, NWFilterCollection, NetworkCollection, NodeDeviceCollection, StoragePoolCollection, StorageVolumeCollection
Instance Attribute Summary collapse
-
#interface ⇒ Object
readonly
Returns the value of attribute interface.
Instance Method Summary collapse
-
#initialize(interface) ⇒ AbstractCollection
constructor
Initializes a new collection.
Constructor Details
#initialize(interface) ⇒ AbstractCollection
Initializes a new collection. All collections belong to a parent structure in some way, which is expected to be passed in here.
22 23 24 |
# File 'lib/libvirt/collection/abstract_collection.rb', line 22 def initialize(interface) @interface = interface end |
Instance Attribute Details
#interface ⇒ Object (readonly)
Returns the value of attribute interface.
16 17 18 |
# File 'lib/libvirt/collection/abstract_collection.rb', line 16 def interface @interface end |