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.
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 |