Class: Apipie::Generator::Swagger::ReferencedDefinitions
- Inherits:
-
Object
- Object
- Apipie::Generator::Swagger::ReferencedDefinitions
- Includes:
- Singleton
- Defined in:
- lib/apipie/generator/swagger/referenced_definitions.rb
Instance Attribute Summary collapse
-
#definitions ⇒ Object
readonly
Returns the value of attribute definitions.
Instance Method Summary collapse
- #add!(param_type, schema) ⇒ Object
- #added?(name) ⇒ Boolean
-
#initialize ⇒ ReferencedDefinitions
constructor
A new instance of ReferencedDefinitions.
Constructor Details
#initialize ⇒ ReferencedDefinitions
Returns a new instance of ReferencedDefinitions.
6 7 8 |
# File 'lib/apipie/generator/swagger/referenced_definitions.rb', line 6 def initialize @definitions = {} end |
Instance Attribute Details
#definitions ⇒ Object (readonly)
Returns the value of attribute definitions.
4 5 6 |
# File 'lib/apipie/generator/swagger/referenced_definitions.rb', line 4 def definitions @definitions end |
Instance Method Details
#add!(param_type, schema) ⇒ Object
10 11 12 |
# File 'lib/apipie/generator/swagger/referenced_definitions.rb', line 10 def add!(param_type, schema) @definitions[param_type] = schema end |
#added?(name) ⇒ Boolean
14 15 16 |
# File 'lib/apipie/generator/swagger/referenced_definitions.rb', line 14 def added?(name) @definitions.key?(name) end |