Module: Jade::Decode
- Defined in:
- lib/jade/decode.rb
Defined Under Namespace
Modules: Desc, Runner Classes: AtField, AtIndex, Custom, Decoder, Failure, MissingField, Multiple, WrongType
Constant Summary collapse
- ABSENT =
Distinguishes a key that is absent from one whose value is nil.
Object.new
Class Method Summary collapse
-
.type_name(v) ⇒ Object
Public so specialized boundary decoders can emit error values matching the interpreter's
WrongTypeformat without going throughRunner.
Class Method Details
.type_name(v) ⇒ Object
Public so specialized boundary decoders can emit error values matching
the interpreter's WrongType format without going through Runner.
427 428 429 430 431 432 433 434 435 436 437 438 |
# File 'lib/jade/decode.rb', line 427 def self.type_name(v) case v when ::String then "String" when ::Integer then "Int" when ::Float then "Float" when TrueClass, FalseClass then "Bool" when ::NilClass then "null" when ::Array then "Array" when ::Hash then "Object" else v.class.name end end |