Class: SwaggerModel::SwaggerV2::Included

Inherits:
Object
  • Object
show all
Defined in:
lib/swagger_model/included.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(array) ⇒ Included

Returns a new instance of Included.



6
7
8
# File 'lib/swagger_model/included.rb', line 6

def initialize(array)
  @models = array.map { |e| Model.new(e) }
end

Instance Attribute Details

#modelsObject

Returns the value of attribute models.



4
5
6
# File 'lib/swagger_model/included.rb', line 4

def models
  @models
end

Instance Method Details

#models_to_swagger_hash(model) ⇒ Object



10
11
12
13
14
# File 'lib/swagger_model/included.rb', line 10

def models_to_swagger_hash(model)
  @models.each do |e|
    e.to_swagger_hash(model)
  end
end