Class: Aws::Templates::Utils::Contextualized::Filter::Proxy
- Inherits:
-
Aws::Templates::Utils::Contextualized::Filter
- Object
- Aws::Templates::Utils::Contextualized::Filter
- Aws::Templates::Utils::Contextualized::Filter::Proxy
- 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
-
#proc ⇒ Object
readonly
Returns the value of attribute proc.
Instance Method Summary collapse
- #filter(opts, memo, instance) ⇒ Object
-
#initialize(prc, &blk) ⇒ Proxy
constructor
A new instance of Proxy.
Methods inherited from Aws::Templates::Utils::Contextualized::Filter
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
#proc ⇒ Object (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 |