Class: EasyType::Helpers::InstancesResults

Inherits:
Hash
  • Object
show all
Defined in:
lib/easy_type/helper.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



16
17
18
19
20
# File 'lib/easy_type/helper.rb', line 16

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