class Mustermann::Caster::Value
Class for block based casts that are triggered for key/value pairs with a matching value. @!visibility private
Public Class Methods
new(type, &block)
click to toggle source
@param [#===] type used for matching values @!visibility private
Calls superclass method
Mustermann::Caster::Any::new
# File lib/mustermann/caster.rb, line 80 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 87 def cast(key, value) super if @type === value end