Class: Virtus::Coercion::FalseClass

Inherits:
Object show all
Defined in:
lib/virtus/coercion/false_class.rb

Overview

Coerce false values

Constant Summary

Constants inherited from Object

Object::COERCION_METHOD_REGEXP

Constants included from TypeLookup

TypeLookup::EXTRA_CONST_ARGS, TypeLookup::TYPE_FORMAT

Class Method Summary collapse

Methods inherited from Object

method_missing

Methods inherited from Virtus::Coercion

[]

Methods included from DescendantsTracker

#add_descendant, #descendants

Methods included from TypeLookup

#determine_type, #primitive

Methods included from Options

#accept_options, #accepted_options, #options

Class Method Details

.to_string(value) ⇒ String

Coerce given value to String

Examples:

Virtus::Coercion::FalseClass.to_string(false)  # => "false"

Parameters:

Returns:



18
19
20
# File 'lib/virtus/coercion/false_class.rb', line 18

def self.to_string(value)
  value.to_s
end