Class: Libvirt::Domain::State

Inherits:
Enum
  • Object
show all
Defined in:
lib/libvirt-ext.rb

Class Method Summary collapse

Class Method Details

.[](*s) ⇒ Object



208
209
210
211
212
213
214
215
# File 'lib/libvirt-ext.rb', line 208

def self.[] *s
	state, reason = s.flatten
	state = find state
	if reason
		[state, state.reasons.find( reason)]
	else state
	end
end