Class: Aws::Templates::Utils::Contextualized::Filter::Proxy

Inherits:
Aws::Templates::Utils::Contextualized::Filter show all
Defined in:
lib/aws/templates/utils/contextualized/filter/proxy.rb

Overview

Proc proxy

Just passes opts to the proc the filter was initialized with. It is used internaly.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Aws::Templates::Utils::Contextualized::Filter

#&, #to_filter, #to_proc

Constructor Details

#initialize(prc, &blk) ⇒ Proxy

Returns a new instance of Proxy.



17
18
19
# File 'lib/aws/templates/utils/contextualized/filter/proxy.rb', line 17

def initialize(prc, &blk)
  @proc = prc || blk
end

Instance Attribute Details

#procObject (readonly)

Returns the value of attribute proc.



15
16
17
# File 'lib/aws/templates/utils/contextualized/filter/proxy.rb', line 15

def proc
  @proc
end

Instance Method Details

#filter(opts, memo, instance) ⇒ Object



21
22
23
# File 'lib/aws/templates/utils/contextualized/filter/proxy.rb', line 21

def filter(opts, memo, instance)
  instance.instance_exec(opts, memo, &proc)
end