Sha256: 6540814e5a38e450e90539c6ba058d448492faa4e800ea517e75c7c006cf685f

Contents?: true

Size: 298 Bytes

Versions: 9

Compression:

Stored size: 298 Bytes

Contents

module Goliath
  module Rack
    module Types
      class Symbol < Base
        ERROR_MESSAGE = "%s can't convert to Symbol"
        def _coerce(val)
          begin
            val.to_sym
          rescue
            raise ERROR_MESSAGE % val
          end
        end
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
goliath-1.0.7 lib/goliath/rack/types/symbol.rb
goliath-1.0.6 lib/goliath/rack/types/symbol.rb
goliath-1.0.5 lib/goliath/rack/types/symbol.rb
goliath-1.0.4 lib/goliath/rack/types/symbol.rb
goliath-1.0.3 lib/goliath/rack/types/symbol.rb
goliath-1.0.2 lib/goliath/rack/types/symbol.rb
goliath-1.0.1 lib/goliath/rack/types/symbol.rb
goliath-1.0.0 lib/goliath/rack/types/symbol.rb
goliath-1.0.0.beta.1 lib/goliath/rack/types/symbol.rb