Class: Swagger::Schema::Component
- Inherits:
-
Object
- Object
- Swagger::Schema::Component
- Defined in:
- lib/swagger/schema/component.rb
Instance Attribute Summary collapse
-
#schema ⇒ Object
readonly
Returns the value of attribute schema.
Instance Method Summary collapse
-
#initialize(schema) ⇒ Component
constructor
A new instance of Component.
- #serializer(options = {}, store = true) ⇒ Object
Constructor Details
#initialize(schema) ⇒ Component
Returns a new instance of Component.
8 9 10 |
# File 'lib/swagger/schema/component.rb', line 8 def initialize(schema) @schema = schema end |
Instance Attribute Details
#schema ⇒ Object (readonly)
Returns the value of attribute schema.
6 7 8 |
# File 'lib/swagger/schema/component.rb', line 6 def schema @schema end |
Instance Method Details
#serializer(options = {}, store = true) ⇒ Object
12 13 14 15 |
# File 'lib/swagger/schema/component.rb', line 12 def serializer( = {}, store = true) = store ? Swagger::Serializer::Store.current..merge() : JSON::Schema::Serializer.new(@schema, ) end |