Class: JSONAPIonify::Types::ArrayType
- Defined in:
- lib/jsonapionify/types/array_type.rb
Instance Attribute Summary
Attributes inherited from BaseType
Instance Method Summary collapse
Methods inherited from BaseType
dumper, #initialize, loader, #name, #not_null!, #not_null?, #to_s
Methods included from Callbacks
Constructor Details
This class inherits a constructor from JSONAPIonify::Types::BaseType
Instance Method Details
#sample(field_name) ⇒ Object
10 11 12 13 14 15 |
# File 'lib/jsonapionify/types/array_type.rb', line 10 def sample(field_name) field_name = field_name.to_s.singularize.to_sym 3.times.map do ([:of] || StringType.new).sample(field_name) end end |