Class: Definition::Types::Or
- Includes:
- Dsl
- Defined in:
- lib/definition/types/or.rb
Defined Under Namespace
Modules: Dsl Classes: Conformer
Instance Attribute Summary collapse
-
#definitions ⇒ Object
Returns the value of attribute definitions.
Attributes inherited from Base
Instance Method Summary collapse
- #conform(value) ⇒ Object
- #error_renderer ⇒ Object
-
#initialize(name, *args) ⇒ Or
constructor
A new instance of Or.
Methods included from Dsl
Methods inherited from Base
Constructor Details
#initialize(name, *args) ⇒ Or
Returns a new instance of Or.
18 19 20 21 |
# File 'lib/definition/types/or.rb', line 18 def initialize(name, *args) self.definitions = *args super(name) end |
Instance Attribute Details
#definitions ⇒ Object
Returns the value of attribute definitions.
16 17 18 |
# File 'lib/definition/types/or.rb', line 16 def definitions @definitions end |
Instance Method Details
#conform(value) ⇒ Object
23 24 25 |
# File 'lib/definition/types/or.rb', line 23 def conform(value) Conformer.new(self).conform(value) end |
#error_renderer ⇒ Object
27 28 29 |
# File 'lib/definition/types/or.rb', line 27 def error_renderer ErrorRenderers::Leaf end |