Class: Goliath::Rack::Types::Symbol
- Defined in:
- lib/goliath/rack/types/symbol.rb
Constant Summary collapse
- ERROR_MESSAGE =
"%s can't convert to Symbol"
Instance Method Summary collapse
Methods inherited from Base
Methods included from Validator
Constructor Details
This class inherits a constructor from Goliath::Rack::Types::Base
Instance Method Details
#_coerce(val) ⇒ Object
6 7 8 9 10 11 12 |
# File 'lib/goliath/rack/types/symbol.rb', line 6 def _coerce(val) begin val.to_sym rescue raise ERROR_MESSAGE % val end end |