Class: Ridley::DBIChainLink Private

Inherits:
Object
  • Object
show all
Defined in:
lib/ridley/resources/data_bag.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, connection, 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:



10
11
12
13
14
15
16
# File 'lib/ridley/resources/data_bag.rb', line 10

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

  @data_bag = data_bag
  @connection = connection
  @klass = options[:encrypted] ? Ridley::EncryptedDataBagItem : Ridley::DataBagItem
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.



22
23
24
# File 'lib/ridley/resources/data_bag.rb', line 22

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

Instance Attribute Details

#connectionObject (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.



6
7
8
# File 'lib/ridley/resources/data_bag.rb', line 6

def connection
  @connection
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.



5
6
7
# File 'lib/ridley/resources/data_bag.rb', line 5

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.



7
8
9
# File 'lib/ridley/resources/data_bag.rb', line 7

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.



18
19
20
# File 'lib/ridley/resources/data_bag.rb', line 18

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