Class: DAP::Relation::Many

Inherits:
Object
  • Object
show all
Defined in:
lib/dap/relation.rb

Overview

Indicates a property is expected to be an array of the specified type

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(klazz) ⇒ Many

Returns a new instance of Many.

Parameters:

  • klazz (Class)

    the expected element type



14
15
16
17
# File 'lib/dap/relation.rb', line 14

def initialize(klazz)
  DAP::Relation.supported!(klazz)
  @klazz = klazz
end

Instance Attribute Details

#klazzObject (readonly)

The expected element type.



11
12
13
# File 'lib/dap/relation.rb', line 11

def klazz
  @klazz
end