Class: Opto::Types::Boolean

Inherits:
Opto::Type show all
Defined in:
lib/opto/types/boolean.rb

Overview

A boolean value.

Options:

:truthy an array of strings / values that are converted to True.
:nil_is by default false
:blank_is by default false too
:as by default outputs a string. integer outputs a number, true_or_nil outputs true or nil. set to nil to just output whatever is in :true and :false
:true says "true" by default when outputting a string
:false says "false" by default when outputting a string

Constant Summary

Constants inherited from Opto::Type

Opto::Type::GLOBAL_OPTIONS

Instance Attribute Summary

Attributes inherited from Opto::Type

#options

Method Summary

Methods inherited from Opto::Type

#errors, for, inherited, #initialize, #required?, #sanitize, sanitizer, sanitizers, true_when, type, #type, types, #valid?, #validate, validator, validators

Constructor Details

This class inherits a constructor from Opto::Type