Class: WmiLite::Wmi::Instance

Inherits:
Object
  • Object
show all
Defined in:
lib/wmi-lite/wmi_instance.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_objectObject (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