Class: SwaggerParser::EnumerableObject

Inherits:
SourceBasedObject show all
Includes:
Enumerable
Defined in:
lib/swagger_parser/enumerable_object.rb

Instance Attribute Summary

Attributes inherited from SourceBasedObject

#source

Instance Method Summary collapse

Methods inherited from SourceBasedObject

#initialize

Constructor Details

This class inherits a constructor from SwaggerParser::SourceBasedObject

Instance Method Details

#[](key) ⇒ SwaggerParser::SourceBasedObject?



16
17
18
19
# File 'lib/swagger_parser/enumerable_object.rb', line 16

def [](key)
  value = source[key]
  build_element(value) if value
end

#each(&block) ⇒ Object

Note:

Implementation for Enumerable



8
9
10
11
12
# File 'lib/swagger_parser/enumerable_object.rb', line 8

def each(&block)
  source.each do |key, value|
    block.call([key, build_element(value)])
  end
end