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
Source
# File lib/mustermann/caster.rb, line 97 def initialize(type, &block) @type = type super(&block) end
@param [#===] type used for matching keys @!visibility private
Calls superclass method
Mustermann::Caster::Any::new
Public Instance Methods
Source
# File lib/mustermann/caster.rb, line 104 def cast(key, value) super if @type === key end
@see Mustermann::Caster#cast
@!visibility private
Calls superclass method
Mustermann::Caster::Any#cast