Class: WmiLite::Wmi::Instance
- Inherits:
-
Object
- Object
- WmiLite::Wmi::Instance
- Defined in:
- lib/wmi-lite/wmi_instance.rb
Instance Attribute Summary collapse
-
#wmi_ole_object ⇒ Object
readonly
Returns the value of attribute wmi_ole_object.
Instance Method Summary collapse
- #[](key) ⇒ Object
-
#initialize(wmi_ole_object) ⇒ Instance
constructor
A new instance of Instance.
Constructor Details
#initialize(wmi_ole_object) ⇒ Instance
Returns a new instance of Instance.
24 25 26 27 |
# File 'lib/wmi-lite/wmi_instance.rb', line 24 def initialize(wmi_ole_object) @wmi_ole_object = wmi_ole_object @property_map = wmi_ole_object_to_hash(wmi_ole_object) end |
Instance Attribute Details
#wmi_ole_object ⇒ Object (readonly)
Returns the value of attribute wmi_ole_object.
22 23 24 |
# File 'lib/wmi-lite/wmi_instance.rb', line 22 def wmi_ole_object @wmi_ole_object end |
Instance Method Details
#[](key) ⇒ Object
29 30 31 |
# File 'lib/wmi-lite/wmi_instance.rb', line 29 def [](key) @property_map[key.downcase] end |