Class: Apia::Definitions::Object
- Inherits:
-
Apia::Definition
- Object
- Apia::Definition
- Apia::Definitions::Object
- Defined in:
- lib/apia/definitions/object.rb
Instance Attribute Summary collapse
-
#conditions ⇒ Object
readonly
Returns the value of attribute conditions.
-
#fields ⇒ Object
readonly
Returns the value of attribute fields.
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
#conditions ⇒ Object (readonly)
Returns the value of attribute conditions.
11 12 13 |
# File 'lib/apia/definitions/object.rb', line 11 def conditions @conditions end |
#fields ⇒ Object (readonly)
Returns the value of attribute fields.
12 13 14 |
# File 'lib/apia/definitions/object.rb', line 12 def fields @fields end |
Instance Method Details
#dsl ⇒ Object
19 20 21 |
# File 'lib/apia/definitions/object.rb', line 19 def dsl @dsl ||= DSLs::Object.new(self) end |
#setup ⇒ Object
14 15 16 17 |
# File 'lib/apia/definitions/object.rb', line 14 def setup @conditions = [] @fields = FieldSet.new end |
#validate(errors) ⇒ Object
23 24 25 |
# File 'lib/apia/definitions/object.rb', line 23 def validate(errors) @fields.validate(errors, self) end |