Class: Swagger::Blocks::ApiNode

Inherits:
Node
  • Object
show all
Defined in:
lib/swagger/blocks.rb

Overview

Instance Attribute Summary

Attributes inherited from Node

#name

Instance Method Summary collapse

Methods inherited from Node

#as_json, call, #data, #key

Instance Method Details

#operation(&block) ⇒ Object



303
304
305
306
# File 'lib/swagger/blocks.rb', line 303

def operation(&block)
  self.data[:operations] ||= []
  self.data[:operations] << Swagger::Blocks::OperationNode.call(&block)
end