Class: Swagger::Blocks::Nodes::ItemsNode

Inherits:
Swagger::Blocks::Node show all
Defined in:
lib/swagger/blocks/nodes/items_node.rb

Overview

v2.0:

Instance Attribute Summary

Attributes inherited from Swagger::Blocks::Node

#name, #version

Instance Method Summary collapse

Methods inherited from Swagger::Blocks::Node

#as_json, call, #data, #is_swagger_2_0?, #key, #keys

Instance Method Details

#property(name, inline_keys = nil, &block) ⇒ Object


6
7
8
9
10
# File 'lib/swagger/blocks/nodes/items_node.rb', line 6

def property(name, inline_keys = nil, &block)
  self.data[:properties] ||= Swagger::Blocks::Nodes::PropertiesNode.new
  self.data[:properties].version = version
  self.data[:properties].property(name, inline_keys, &block)
end