Class: Coercible::Coercer::Array

Inherits:
Object
  • Object
show all
Defined in:
lib/coercible/coercer/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 Options

Options::Undefined

Constants included from TypeLookup

TypeLookup::TYPE_FORMAT

Instance Attribute Summary

Attributes inherited from Object

#coercers

Instance Method Summary collapse

Methods inherited from Object

#coerced?, #initialize, #inspect, #to_array, #to_hash, #to_integer, #to_string

Methods included from Options

#accept_options, #accepted_options, extended, #options

Methods included from TypeLookup

#determine_type, extended, #primitive

Constructor Details

This class inherits a constructor from Coercible::Coercer::Object

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Coercible::Coercer::Object

Instance 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/coercible/coercer/array.rb', line 17

def to_set(value)
  value.to_set
end