Class: Odin::Types::SchemaArray
- Inherits:
-
Object
- Object
- Odin::Types::SchemaArray
- Defined in:
- lib/odin/types/schema.rb
Overview
Schema array definition
Instance Attribute Summary collapse
-
#columns ⇒ Object
readonly
Returns the value of attribute columns.
-
#item_fields ⇒ Object
readonly
Returns the value of attribute item_fields.
-
#max_items ⇒ Object
readonly
Returns the value of attribute max_items.
-
#min_items ⇒ Object
readonly
Returns the value of attribute min_items.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#unique ⇒ Object
readonly
Returns the value of attribute unique.
Instance Method Summary collapse
-
#initialize(path:, item_fields: {}, min_items: nil, max_items: nil, unique: false, columns: nil) ⇒ SchemaArray
constructor
A new instance of SchemaArray.
Constructor Details
#initialize(path:, item_fields: {}, min_items: nil, max_items: nil, unique: false, columns: nil) ⇒ SchemaArray
Returns a new instance of SchemaArray.
178 179 180 181 182 183 184 185 186 187 |
# File 'lib/odin/types/schema.rb', line 178 def initialize(path:, item_fields: {}, min_items: nil, max_items: nil, unique: false, columns: nil) @path = path.freeze @item_fields = item_fields.freeze @min_items = min_items @max_items = max_items @unique = unique @columns = columns&.freeze freeze end |
Instance Attribute Details
#columns ⇒ Object (readonly)
Returns the value of attribute columns.
176 177 178 |
# File 'lib/odin/types/schema.rb', line 176 def columns @columns end |
#item_fields ⇒ Object (readonly)
Returns the value of attribute item_fields.
176 177 178 |
# File 'lib/odin/types/schema.rb', line 176 def item_fields @item_fields end |
#max_items ⇒ Object (readonly)
Returns the value of attribute max_items.
176 177 178 |
# File 'lib/odin/types/schema.rb', line 176 def max_items @max_items end |
#min_items ⇒ Object (readonly)
Returns the value of attribute min_items.
176 177 178 |
# File 'lib/odin/types/schema.rb', line 176 def min_items @min_items end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
176 177 178 |
# File 'lib/odin/types/schema.rb', line 176 def path @path end |
#unique ⇒ Object (readonly)
Returns the value of attribute unique.
176 177 178 |
# File 'lib/odin/types/schema.rb', line 176 def unique @unique end |