Sha256: 05514c4344bb6071c8a619f53f72d28eebd449ae41c3b03fc4978aad2ac4c152

Contents?: true

Size: 710 Bytes

Versions: 59

Compression:

Stored size: 710 Bytes

Contents

module Ridley
  class DataBagObject < ChefObject
    set_chef_id "name"

    attribute :name,
      required: true

    def item
      DataBagItemProxy.new(self, resource.item_resource)
    end

    # @api private
    class DataBagItemProxy
      attr_reader :data_bag_object
      attr_reader :item_resource

      # @param [Ridley::DataBagObject] data_bag_object
      # @param [Ridley::DataBagItemResource] item_resource
      def initialize(data_bag_object, item_resource)
        @data_bag_object = data_bag_object
        @item_resource   = item_resource
      end

      def method_missing(fun, *args, &block)
        @item_resource.send(fun, data_bag_object, *args, &block)
      end
    end
  end
end

Version data entries

59 entries across 59 versions & 1 rubygems

Version Path
ridley-5.1.1 lib/ridley/chef_objects/data_bag_object.rb
ridley-5.1.0 lib/ridley/chef_objects/data_bag_object.rb
ridley-5.0.0 lib/ridley/chef_objects/data_bag_object.rb
ridley-4.6.1 lib/ridley/chef_objects/data_bag_object.rb
ridley-4.6.0 lib/ridley/chef_objects/data_bag_object.rb
ridley-4.5.1 lib/ridley/chef_objects/data_bag_object.rb
ridley-4.5.0 lib/ridley/chef_objects/data_bag_object.rb
ridley-4.4.3 lib/ridley/chef_objects/data_bag_object.rb
ridley-4.4.2 lib/ridley/chef_objects/data_bag_object.rb
ridley-4.4.1 lib/ridley/chef_objects/data_bag_object.rb
ridley-4.4.0 lib/ridley/chef_objects/data_bag_object.rb
ridley-4.3.2 lib/ridley/chef_objects/data_bag_object.rb
ridley-4.3.1 lib/ridley/chef_objects/data_bag_object.rb
ridley-4.3.0 lib/ridley/chef_objects/data_bag_object.rb
ridley-4.2.0 lib/ridley/chef_objects/data_bag_object.rb
ridley-4.1.2 lib/ridley/chef_objects/data_bag_object.rb
ridley-4.1.1 lib/ridley/chef_objects/data_bag_object.rb
ridley-4.1.0 lib/ridley/chef_objects/data_bag_object.rb
ridley-4.0.0 lib/ridley/chef_objects/data_bag_object.rb
ridley-3.1.0 lib/ridley/chef_objects/data_bag_object.rb