Class: OpenApi::DSL::HeaderObj

Inherits:
Hash
  • Object
show all
Includes:
Helpers
Defined in:
lib/oas_objs/header_obj.rb

Overview

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Helpers

#_combined_schema, #arrow_writing_support, #process_schema_input

Constructor Details

#initialize(desc = '', schema) ⇒ HeaderObj

Returns a new instance of HeaderObj.



13
14
15
16
# File 'lib/oas_objs/header_obj.rb', line 13

def initialize(desc = '', schema)
  self.schema = SchemaObj.new(schema)
  self.processed = { description: desc }
end

Instance Attribute Details

#processedObject

Returns the value of attribute processed.



11
12
13
# File 'lib/oas_objs/header_obj.rb', line 11

def processed
  @processed
end

#schemaObject

Returns the value of attribute schema.



11
12
13
# File 'lib/oas_objs/header_obj.rb', line 11

def schema
  @schema
end

Instance Method Details

#processObject



18
19
20
# File 'lib/oas_objs/header_obj.rb', line 18

def process
  processed.merge!(schema: schema.process)
end