Class: Respect::ArrayDef
- Inherits:
-
GlobalDef
- Object
- GlobalDef
- Respect::ArrayDef
- Includes:
- DefWithoutName
- Defined in:
- lib/respect/array_def.rb
Instance Method Summary (collapse)
- - (Object) extra_items(&block)
-
- (ArrayDef) initialize(options = {})
constructor
A new instance of ArrayDef.
- - (Object) items(&block)
Methods inherited from GlobalDef
#accept_name?, accept_name?, core_contexts, eval, #eval, include_core_statements
Constructor Details
- (ArrayDef) initialize(options = {})
A new instance of ArrayDef
6 7 8 |
# File 'lib/respect/array_def.rb', line 6 def initialize( = {}) @array_schema = ArraySchema.new() end |
Instance Method Details
- (Object) extra_items(&block)
14 15 16 |
# File 'lib/respect/array_def.rb', line 14 def extra_items(&block) @array_schema.extra_items = ItemsDef.eval(&block) end |
- (Object) items(&block)
10 11 12 |
# File 'lib/respect/array_def.rb', line 10 def items(&block) @array_schema.items = ItemsDef.eval(&block) end |