Class: Virtus::Coercion::Object

Inherits:
Virtus::Coercion show all
Defined in:
lib/virtus/coercion/object.rb

Overview

Coerce Object values

Direct Known Subclasses

Date, DateTime, FalseClass, Hash, Numeric, String, Symbol, Time, TrueClass

Constant Summary

Constants included from TypeLookup

TypeLookup::TYPE_FORMAT

Class Method Summary collapse

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

.method_missing(method, *args) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Passthrough given value

Parameters:

Returns:



15
16
17
18
19
20
21
# File 'lib/virtus/coercion/object.rb', line 15

def self.method_missing(method, *args)
  if method.to_s[0, 3] == 'to_' && args.size == 1
    args.first
  else
    super
  end
end