Class: ParamsReady::Value::GenericCoder
Instance Method Summary
collapse
late_init
obligatory, obligatory!
Methods included from Coercion
#strict_default?, #try_coerce
Constructor Details
Returns a new instance of GenericCoder.
69
70
71
72
73
74
|
# File 'lib/params_ready/value/coder.rb', line 69
def initialize(name)
@name = name
@coerce = nil
@format = nil
@type_identifier = nil
end
|
Instance Method Details
#coerce(input, context) ⇒ Object
84
85
86
|
# File 'lib/params_ready/value/coder.rb', line 84
def coerce(input, context)
@coerce[input, context]
end
|
#finish ⇒ Object
92
93
94
95
|
# File 'lib/params_ready/value/coder.rb', line 92
def finish
super
freeze
end
|
88
89
90
|
# File 'lib/params_ready/value/coder.rb', line 88
def format(value, format)
@format[value, format]
end
|
#value_class_name ⇒ Object
80
81
82
|
# File 'lib/params_ready/value/coder.rb', line 80
def value_class_name
@name
end
|