Class: Virtus::Coercion::Array

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

Overview

Coerce Array values

Constant Summary collapse

TIME_SEGMENTS =
[ :year, :month, :day, :hour, :min, :sec ].freeze

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_set(value) ⇒ Array

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.

Creates a Set instance from an Array

Parameters:

Returns:



17
18
19
# File 'lib/virtus/coercion/array.rb', line 17

def self.to_set(value)
  value.to_set
end