Class: Apia::Definitions::Polymorph
- Inherits:
-
Apia::Definition
- Object
- Apia::Definition
- Apia::Definitions::Polymorph
- Defined in:
- lib/apia/definitions/polymorph.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Attributes inherited from Apia::Definition
#description, #id, #name, #schema
Instance Method Summary collapse
Methods inherited from Apia::Definition
Constructor Details
This class inherits a constructor from Apia::Definition
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
11 12 13 |
# File 'lib/apia/definitions/polymorph.rb', line 11 def @options end |
Instance Method Details
#dsl ⇒ Object
17 18 19 |
# File 'lib/apia/definitions/polymorph.rb', line 17 def dsl @dsl ||= DSLs::Polymorph.new(self) end |
#setup ⇒ Object
13 14 15 |
# File 'lib/apia/definitions/polymorph.rb', line 13 def setup @options = {} end |
#validate(errors) ⇒ Object
21 22 23 24 25 |
# File 'lib/apia/definitions/polymorph.rb', line 21 def validate(errors) @options.each_value do |option| option.validate(errors) end end |