Class: T::Array
- Inherits:
-
Object
- Object
- T::Array
- Defined in:
- lib/json_model/types/array.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(type) ⇒ Array
constructor
A new instance of Array.
- #to_type_spec(**options) ⇒ JsonModel::TypeSpec::Array
Constructor Details
#initialize(type) ⇒ Array
Returns a new instance of Array.
6 7 8 |
# File 'lib/json_model/types/array.rb', line 6 def initialize(type) @type = type end |
Class Method Details
.[](type) ⇒ Array
21 22 23 |
# File 'lib/json_model/types/array.rb', line 21 def [](type) Array.new(type) end |
Instance Method Details
#to_type_spec(**options) ⇒ JsonModel::TypeSpec::Array
11 12 13 14 15 16 |
# File 'lib/json_model/types/array.rb', line 11 def to_type_spec(**) JsonModel::TypeSpec::Array.new( JsonModel::TypeSpec.resolve(@type), **, ) end |