Class: Respect::ArrayDef

Inherits:
GlobalDef show all
Includes:
DefWithoutName
Defined in:
lib/respect/array_def.rb

Instance Method Summary (collapse)

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(options = {})
  @array_schema = ArraySchema.new(options)
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