class Aws::Templates::Utils::Contextualized::Filter::Identity
No-op filter
No-op filter or identity filter doesn't perform any operations on passed options. The role of this filter is to play the role of identity function in par with lambda calculus.
Examples¶ ↑
class Piece include Aws::Templates::Utils::Contextualized contextualize filter(:identity) end i = Piece.new opts = Options.new(a: { q: 1 }, b: 2, c: { d: { r: 5 }, e: 1 }) opts.filter(i.filter) # => {}
Public Class Methods
new()
click to toggle source
Calls superclass method
# File lib/aws/templates/utils/contextualized/filter/identity.rb, line 29 def self.new @singleton ||= super() end
Public Instance Methods
&(other)
click to toggle source
# File lib/aws/templates/utils/contextualized/filter/identity.rb, line 37 def &(other) other.to_filter end
filter(_, memo, _)
click to toggle source
# File lib/aws/templates/utils/contextualized/filter/identity.rb, line 33 def filter(_, memo, _) memo end