Class: Leftovers::ConfigLoader::ValueOrObjectSchema
- Inherits:
-
ObjectSchema
- Object
- Schema
- ObjectSchema
- Leftovers::ConfigLoader::ValueOrObjectSchema
- Defined in:
- lib/leftovers/config_loader/value_or_object_schema.rb
Direct Known Subclasses
ArgumentPositionSchema, HasArgumentSchema, HasReceiverSchema, HasValueSchema, KeepTestOnlySchema, KeywordArgumentSchema, PrecompilerSchema, RequireSchema, StringPatternSchema, StringValueProcessorSchema, TransformSchema, ValueMatcherSchema, ValueProcessorSchema
Class Attribute Summary collapse
-
.or_value_schema ⇒ Object
Returns the value of attribute or_value_schema.
Class Method Summary collapse
Methods inherited from ObjectSchema
attribute, attributes, inherit_attributes_from, require_groups
Methods inherited from Schema
Class Attribute Details
.or_value_schema ⇒ Object
Returns the value of attribute or_value_schema.
7 8 9 |
# File 'lib/leftovers/config_loader/value_or_object_schema.rb', line 7 def or_value_schema @or_value_schema end |
Class Method Details
.to_ruby(node) ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/leftovers/config_loader/value_or_object_schema.rb', line 17 def to_ruby(node) if node.hash? super else or_value_schema.to_ruby(node) end end |
.validate(node) ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/leftovers/config_loader/value_or_object_schema.rb', line 9 def validate(node) if node.hash? super(node) else validate_or_value_schema(node) end end |