Class: EasyType::Utils::InstancesResults

Inherits:
Hash
  • Object
show all
Defined in:
lib/easy_type/utils.rb

Instance Method Summary (collapse)

Instance Method Details

- (Object) column_data(column_name)

Returns content of the specified key in the Hash

Parameters:

  • column_name (Symbol) —

    the name of the column to extract from the Hash

Returns:

  • content of the specified key in the Hash

Raises:

  • (Puppet::Error) —

    when the column name is not used in the Hash



15
16
17
18
19
# File 'lib/easy_type/utils.rb', line 15

def column_data(column_name)
	fetch(column_name) do 
		fail "Column #{column_name} not found in results. Results contain #{keys.join(',')}"
	end
end