Class: ContainerConfig::Coercer::Symbol
- Defined in:
- lib/container_config/coercer/symbol.rb
Overview
Symbol type coercer
Instance Method Summary collapse
-
#coerce(value) ⇒ Symbol
Coerces the given value into a symbol.
- #name ⇒ Object
- #type ⇒ Object
Instance Method Details
#coerce(value) ⇒ Symbol
Coerces the given value into a symbol
26 27 28 29 30 |
# File 'lib/container_config/coercer/symbol.rb', line 26 def coerce(value) return if value.nil? value.to_s.to_sym end |
#name ⇒ Object
10 11 12 |
# File 'lib/container_config/coercer/symbol.rb', line 10 def name "Symbol" end |
#type ⇒ Object
15 16 17 |
# File 'lib/container_config/coercer/symbol.rb', line 15 def type :symbol end |