Method: ChefAPI::Schema#primary_key

Defined in:
lib/chef-api/schema.rb

#primary_keySymbol

The defined primary key for this schema. If no primary key is given, it is assumed to be the first item in the list.

Returns:

  • (Symbol)


42
43
44
# File 'lib/chef-api/schema.rb', line 42

def primary_key
  @primary_key ||= @attributes.first[0]
end