class ChefZero::Endpoints::DataBagItemEndpoint

/data/NAME/NAME

Public Class Methods

new(server) click to toggle source
Calls superclass method
# File lib/chef_zero/endpoints/data_bag_item_endpoint.rb, line 10
def initialize(server)
  super(server, 'id')
end
populate_defaults(request, response_json, data_bag, data_bag_item) click to toggle source
# File lib/chef_zero/endpoints/data_bag_item_endpoint.rb, line 18
def self.populate_defaults(request, response_json, data_bag, data_bag_item)
  response = JSON.parse(response_json, :create_additions => false)
  response = DataNormalizer.normalize_data_bag_item(response, data_bag, data_bag_item, request.method)
  JSON.pretty_generate(response)
end

Public Instance Methods

populate_defaults(request, response_json) click to toggle source
# File lib/chef_zero/endpoints/data_bag_item_endpoint.rb, line 14
def populate_defaults(request, response_json)
  DataBagItemEndpoint::populate_defaults(request, response_json, request.rest_path[3], request.rest_path[4])
end