Class: Yori::Schema::Any
- Inherits:
-
Yori::SchemaBase
- Object
- Hash
- Yori::SchemaBase
- Yori::Schema::Any
- Defined in:
- lib/yori/schema/any.rb
Overview
Any: supports any keyword as dsl.
Instance Attribute Summary
Attributes inherited from Yori::SchemaBase
Instance Method Summary collapse
Methods inherited from Yori::SchemaBase
eval_class!, eval_hash!, eval_input!, #ref, #validate!, #validator
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args, &block) ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'lib/yori/schema/any.rb', line 11 def method_missing(name, *args, &block) arg = args.first if arg || block_given? c = self.class.eval_input!(self.class, id, arg, &block) self[name.to_s] = c return self end super end |
Instance Method Details
#respond_to_missing? ⇒ Boolean
7 8 9 |
# File 'lib/yori/schema/any.rb', line 7 def respond_to_missing?(*) true end |