Class: Blacklight::Types::Array

Inherits:
Value
  • Object
show all
Defined in:
app/values/blacklight/types.rb

Direct Known Subclasses

Selector

Instance Method Summary collapse

Methods inherited from Value

coerce

Constructor Details

#initialize(of: nil, **kwargs) ⇒ Array

Returns a new instance of Array.



29
30
31
32
# File 'app/values/blacklight/types.rb', line 29

def initialize(of: nil, **kwargs)
  @of = of
  @kwargs = kwargs
end

Instance Method Details

#cast(input) ⇒ Object



34
35
36
37
38
# File 'app/values/blacklight/types.rb', line 34

def cast(input)
  ::Array.wrap(input).map do |value|
    lookup_type.cast(value)
  end
end