Class: Swagger::Api::Components

Inherits:
Object
  • Object
show all
Includes:
ActiveAttr::Model
Defined in:
lib/swagger/api/components.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#controllersObject

Returns the value of attribute controllers.



5
6
7
# File 'lib/swagger/api/components.rb', line 5

def controllers
  @controllers
end

Instance Method Details

#createObject



7
8
9
10
11
12
13
# File 'lib/swagger/api/components.rb', line 7

def create
  components = {}
  controllers.each do |controller|
    components[controller.model] = ComponentSchema.new(controller: controller).create
  end
  components
end