class Koine::Attributes::Adapter::ArrayOf
Public Class Methods
new(adapter)
click to toggle source
# File lib/koine/attributes/adapter/array_of.rb, line 7 def initialize(adapter) @adapter = adapter with_default_value([]) end
Public Instance Methods
for_values()
click to toggle source
# File lib/koine/attributes/adapter/array_of.rb, line 12 def for_values @adapter end
with_attribute_name(name)
click to toggle source
Calls superclass method
# File lib/koine/attributes/adapter/array_of.rb, line 16 def with_attribute_name(name) @adapter.with_attribute_name(name) super(name) end
Private Instance Methods
coerce_not_nil(collection_of_values)
click to toggle source
# File lib/koine/attributes/adapter/array_of.rb, line 23 def coerce_not_nil(collection_of_values) secure do collection_of_values.map { |value| @adapter.coerce(value) } end end