Class: Blacklight::Types::Array
- Defined in:
- app/values/blacklight/types.rb
Direct Known Subclasses
Instance Method Summary collapse
- #cast(input) ⇒ Object
-
#initialize(of: nil, **kwargs) ⇒ Array
constructor
A new instance of Array.
Methods inherited from Value
Constructor Details
#initialize(of: nil, **kwargs) ⇒ Array
Returns a new instance of Array.
33 34 35 36 |
# File 'app/values/blacklight/types.rb', line 33 def initialize(of: nil, **kwargs) @of = of @kwargs = kwargs end |
Instance Method Details
#cast(input) ⇒ Object
38 39 40 41 42 |
# File 'app/values/blacklight/types.rb', line 38 def cast(input) ::Array.wrap(input).map do |value| lookup_type.cast(value) end end |