Class: ContainerConfig::Coercer::Base
- Inherits:
-
Object
- Object
- ContainerConfig::Coercer::Base
- Defined in:
- lib/container_config/coercer/base.rb
Overview
Base type coercer
Direct Known Subclasses
Boolean, Float, Integer, SslCertificate, SslKey, SslVerifyMode, String, Symbol
Instance Method Summary collapse
-
#coerce(_value) ⇒ Object
Coerces the given value into the coercer type.
-
#name ⇒ String
Returns name of the coercer.
-
#type ⇒ Symbol
Returns the type of the coercer This is used by the ContainerConfig::Coercer.coerce_value method to determine whether this coercer should be used for a given type.
Instance Method Details
#coerce(_value) ⇒ Object
Coerces the given value into the coercer type
34 35 36 |
# File 'lib/container_config/coercer/base.rb', line 34 def coerce(_value) raise ContainerConfig::MissingOverride, "Must override coerce method in derived class #{self.class}" end |
#name ⇒ String
Returns name of the coercer
12 13 14 |
# File 'lib/container_config/coercer/base.rb', line 12 def name raise ContainerConfig::MissingOverride, "Must override name method in derived class #{self.class}" end |
#type ⇒ Symbol
Returns the type of the coercer This is used by the ContainerConfig::Coercer.coerce_value method to determine whether this coercer should be used for a given type
23 24 25 |
# File 'lib/container_config/coercer/base.rb', line 23 def type raise ContainerConfig::MissingOverride, "Must override type method in derived class #{self.class}" end |