Class: Ridley::DBIChainLink Private

Inherits:
Object
  • Object
show all
Defined in:
lib/ridley/resources/data_bag_resource.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Author:

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data_bag, client, options = {}) ⇒ DBIChainLink

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of DBIChainLink

Parameters:

Options Hash (options):

  • :encrypted (Boolean) — default: false

16
17
18
19
20
21
22
# File 'lib/ridley/resources/data_bag_resource.rb', line 16

def initialize(data_bag, client, options = {})
  options[:encrypted] ||= false

  @data_bag = data_bag
  @client = client
  @klass = options[:encrypted] ? Ridley::EncryptedDataBagItemResource : Ridley::DataBagItemResource
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(fun, *args, &block) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.


28
29
30
# File 'lib/ridley/resources/data_bag_resource.rb', line 28

def method_missing(fun, *args, &block)
  klass.send(fun, client, data_bag, *args, &block)
end

Instance Attribute Details

#clientObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.


9
10
11
# File 'lib/ridley/resources/data_bag_resource.rb', line 9

def client
  @client
end

#data_bagObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.


8
9
10
# File 'lib/ridley/resources/data_bag_resource.rb', line 8

def data_bag
  @data_bag
end

#klassObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.


10
11
12
# File 'lib/ridley/resources/data_bag_resource.rb', line 10

def klass
  @klass
end

Instance Method Details

#new(*args) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.


24
25
26
# File 'lib/ridley/resources/data_bag_resource.rb', line 24

def new(*args)
  klass.send(:new, client, data_bag, *args)
end