Class: Definition::Types::And

Inherits:
Base
  • Object
show all
Includes:
Dsl
Defined in:
lib/definition/types/and.rb

Defined Under Namespace

Modules: Dsl Classes: Conformer

Instance Attribute Summary collapse

Attributes inherited from Base

#name

Instance Method Summary collapse

Methods included from Dsl

#validate

Methods inherited from Base

#explain

Constructor Details

#initialize(name, *args) ⇒ And

Returns a new instance of And.



17
18
19
20
# File 'lib/definition/types/and.rb', line 17

def initialize(name, *args)
  self.definitions = *args
  super(name)
end

Instance Attribute Details

#definitionsObject

Returns the value of attribute definitions.



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

def definitions
  @definitions
end

Instance Method Details

#conform(value) ⇒ Object



22
23
24
# File 'lib/definition/types/and.rb', line 22

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