Module: OpenAPIParser::Parser::Object
- Included in:
- Core
- Defined in:
- lib/openapi_parser/concerns/parser/object.rb
Instance Method Summary collapse
- #_openapi_attr_objects ⇒ Object
- #openapi_attr_object(name, klass, options = {}) ⇒ Object
- #openapi_attr_objects(*names, klass) ⇒ Object
Instance Method Details
#_openapi_attr_objects ⇒ Object
2 3 4 |
# File 'lib/openapi_parser/concerns/parser/object.rb', line 2 def _openapi_attr_objects @_openapi_attr_objects ||= {} end |
#openapi_attr_object(name, klass, options = {}) ⇒ Object
10 11 12 13 |
# File 'lib/openapi_parser/concerns/parser/object.rb', line 10 def openapi_attr_object(name, klass, = {}) target_klass.send(:attr_reader, name) _openapi_attr_objects[name] = OpenAPIParser::SchemaLoader::ObjectsLoader.new(name, .merge(klass: klass)) end |
#openapi_attr_objects(*names, klass) ⇒ Object
6 7 8 |
# File 'lib/openapi_parser/concerns/parser/object.rb', line 6 def openapi_attr_objects(*names, klass) names.each { |name| openapi_attr_object(name, klass) } end |