Module: EnvParser::Types::BaseTypes
- Defined in:
- lib/env_parser/types/base_types.rb
Overview
Defines types for primitive classes, adding the following:
:as value |
type returned | default | notes |
---|---|---|---|
:string | String | '' |
|
:symbol | Symbol | :'' |
|
:boolean | TrueValue / FalseValue | false |
|
:int / :integer | Integer | 0 |
|
:float / :decimal / :number | Float | 0.0 |
|
:json | < depends on JSON given > | nil |
|
:array | Array | [] |
|
:hash | Hash | {} |
Note JSON is parsed using quirks-mode (meaning ‘true’, ‘25’, and ‘null’ are all considered valid, parseable JSON).