class Mustermann::Caster::Key
Class for block based casts that are triggered for key/value pairs with a matching key. @!visibility private
Public Class Methods
new(type, &block)
click to toggle source
@param [#===] type used for matching keys @!visibility private
Calls superclass method
Mustermann::Caster::Any.new
# File lib/mustermann/caster.rb, line 96 def initialize(type, &block) @type = type super(&block) end
Public Instance Methods
cast(key, value)
click to toggle source
@see Mustermann::Caster#cast @!visibility private
Calls superclass method
Mustermann::Caster::Any#cast
# File lib/mustermann/caster.rb, line 103 def cast(key, value) super if @type === key end