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.
66
67
68
69
70
71
|
# File 'lib/params_ready/value/coder.rb', line 66
def initialize(name)
@name = name
@coerce = nil
@format = nil
@type_identifier = nil
end
|
Instance Method Details
#coerce(input, context) ⇒ Object
81
82
83
|
# File 'lib/params_ready/value/coder.rb', line 81
def coerce(input, context)
@coerce[input, context]
end
|
#finish ⇒ Object
89
90
91
92
|
# File 'lib/params_ready/value/coder.rb', line 89
def finish
super
freeze
end
|
85
86
87
|
# File 'lib/params_ready/value/coder.rb', line 85
def format(value, format)
@format[value, format]
end
|
#value_class_name ⇒ Object
77
78
79
|
# File 'lib/params_ready/value/coder.rb', line 77
def value_class_name
@name
end
|