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-1.5.0 lib/ridley/chef_objects/data_bag_object.rb
ridley-1.2.5 lib/ridley/chef_objects/data_bag_object.rb
ridley-1.4.1 lib/ridley/chef_objects/data_bag_object.rb
ridley-1.4.0 lib/ridley/chef_objects/data_bag_object.rb
ridley-1.3.2 lib/ridley/chef_objects/data_bag_object.rb
ridley-1.3.1 lib/ridley/chef_objects/data_bag_object.rb
ridley-1.3.0 lib/ridley/chef_objects/data_bag_object.rb
ridley-1.0.3 lib/ridley/chef_objects/data_bag_object.rb
ridley-1.2.4 lib/ridley/chef_objects/data_bag_object.rb
ridley-1.2.3 lib/ridley/chef_objects/data_bag_object.rb
ridley-1.2.2 lib/ridley/chef_objects/data_bag_object.rb
ridley-1.2.1 lib/ridley/chef_objects/data_bag_object.rb
ridley-1.2.0 lib/ridley/chef_objects/data_bag_object.rb
ridley-1.1.1 lib/ridley/chef_objects/data_bag_object.rb
ridley-1.1.0 lib/ridley/chef_objects/data_bag_object.rb
ridley-1.0.2 lib/ridley/chef_objects/data_bag_object.rb
ridley-1.0.1 lib/ridley/chef_objects/data_bag_object.rb
ridley-1.0.0 lib/ridley/chef_objects/data_bag_object.rb
ridley-1.0.0.rc3 lib/ridley/chef_objects/data_bag_object.rb