Class: Definition::Types::Each

Inherits:
Base
  • Object
show all
Defined in:
lib/definition/types/each.rb

Defined Under Namespace

Classes: Conformer

Instance Attribute Summary collapse

Attributes inherited from Base

#name

Instance Method Summary collapse

Methods inherited from Base

#explain

Constructor Details

#initialize(name, definition:) ⇒ Each

Returns a new instance of Each.



10
11
12
13
# File 'lib/definition/types/each.rb', line 10

def initialize(name, definition:)
  self.item_definition = definition
  super(name)
end

Instance Attribute Details

#item_definitionObject

Returns the value of attribute item_definition.



8
9
10
# File 'lib/definition/types/each.rb', line 8

def item_definition
  @item_definition
end

Instance Method Details

#conform(value) ⇒ Object



15
16
17
# File 'lib/definition/types/each.rb', line 15

def conform(value)
  Conformer.new(self).conform(value)
end