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, **options) ⇒ Array
constructor
A new instance of Array.
- #to_type_spec ⇒ JsonModel::TypeSpec::Array
Constructor Details
#initialize(type, **options) ⇒ Array
Returns a new instance of Array.
7 8 9 10 |
# File 'lib/json_model/types/array.rb', line 7 def initialize(type, **) @type = type = end |
Class Method Details
.[](type, **options) ⇒ Array
24 25 26 |
# File 'lib/json_model/types/array.rb', line 24 def [](type, **) Array.new(type, **) end |
Instance Method Details
#to_type_spec ⇒ JsonModel::TypeSpec::Array
13 14 15 16 17 18 |
# File 'lib/json_model/types/array.rb', line 13 def to_type_spec JsonModel::TypeSpec::Array.new( JsonModel::TypeSpec.resolve(@type), **, ) end |