Class: Swagger::Blocks::InfoNode

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

Overview

Instance Attribute Summary

Attributes inherited from Node

#name, #version

Instance Method Summary collapse

Methods inherited from Node

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

Instance Method Details

#contact(&block) ⇒ Object

Raises:



381
382
383
384
385
# File 'lib/swagger/blocks.rb', line 381

def contact(&block)
  raise NotSupportedError unless is_swagger_2_0?

  self.data[:contact] = Swagger::Blocks::ContactNode.call(version: version, &block)
end

#license(&block) ⇒ Object

Raises:



387
388
389
390
391
# File 'lib/swagger/blocks.rb', line 387

def license(&block)
  raise NotSupportedError unless is_swagger_2_0?

  self.data[:license] = Swagger::Blocks::LicenseNode.call(version: version, &block)
end