Class: Apia::Definitions::ArgumentSet
- Inherits:
-
Apia::Definition
- Object
- Apia::Definition
- Apia::Definitions::ArgumentSet
- Defined in:
- lib/apia/definitions/argument_set.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#arguments ⇒ Object
readonly
Returns the value of attribute arguments.
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
#arguments ⇒ Object (readonly)
Returns the value of attribute arguments.
11 12 13 |
# File 'lib/apia/definitions/argument_set.rb', line 11 def arguments @arguments end |
Instance Method Details
#dsl ⇒ Object
17 18 19 |
# File 'lib/apia/definitions/argument_set.rb', line 17 def dsl @dsl ||= DSLs::ArgumentSet.new(self) end |
#setup ⇒ Object
13 14 15 |
# File 'lib/apia/definitions/argument_set.rb', line 13 def setup @arguments = {} end |
#validate(errors) ⇒ Object
21 22 23 24 25 26 27 28 29 |
# File 'lib/apia/definitions/argument_set.rb', line 21 def validate(errors) @arguments.each do |name, argument| if argument.is_a?(Apia::Definitions::Argument) argument.validate(errors) else errors.add self, 'InvalidArgument', "The argument '#{name}' is not an instance of Apia::Definitions::Argument" end end end |