Class: OAPI::Types::Array
- Inherits:
-
Object
- Object
- Object
- OAPI::Types::Array
- Defined in:
- lib/oapi/types/array.rb
Direct Known Subclasses
OpenAPI::V30::Parameters, OpenAPI::V30::Servers, OpenAPI::V30::Tags
Class Attribute Summary collapse
-
.item_name ⇒ Object
readonly
Returns the value of attribute item_name.
-
.item_type ⇒ Object
readonly
Returns the value of attribute item_type.
Instance Attribute Summary collapse
-
#store ⇒ Object
readonly
Returns the value of attribute store.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(store = []) ⇒ Array
constructor
A new instance of Array.
Constructor Details
#initialize(store = []) ⇒ Array
Returns a new instance of Array.
6 7 8 9 |
# File 'lib/oapi/types/array.rb', line 6 def initialize(store = [], &) @store = store super(&) end |
Class Attribute Details
.item_name ⇒ Object (readonly)
Returns the value of attribute item_name.
12 13 14 |
# File 'lib/oapi/types/array.rb', line 12 def item_name @item_name end |
.item_type ⇒ Object (readonly)
Returns the value of attribute item_type.
12 13 14 |
# File 'lib/oapi/types/array.rb', line 12 def item_type @item_type end |
Instance Attribute Details
#store ⇒ Object (readonly)
Returns the value of attribute store.
4 5 6 |
# File 'lib/oapi/types/array.rb', line 4 def store @store end |
Class Method Details
.item(name, type) ⇒ Object
14 15 16 17 18 19 20 21 |
# File 'lib/oapi/types/array.rb', line 14 def item(name, type) @item_name = name @item_type = type define_method(name) do |&block| @store << type.new(&block) end end |