Class: ApiDef::Element

Inherits:
Object
  • Object
show all
Includes:
Support::AttrArray, Support::AttrUno, Support::AttrUnoArray
Defined in:
lib/api_def/element.rb

Direct Known Subclasses

Entry, Group, Parameter, Request, Response, Specification

Instance Method Summary collapse

Methods included from Support::AttrUnoArray

included

Methods included from Support::AttrArray

included

Methods included from Support::AttrUno

included

Constructor Details

#initialize(name = nil, options = {}) {|_self| ... } ⇒ Element

Returns a new instance of Element.

Yields:

  • (_self)

Yield Parameters:



8
9
10
11
12
# File 'lib/api_def/element.rb', line 8

def initialize(name = nil, options = {})
  self.name name
  self.on_options(options)
  yield self if block_given?
end

Instance Method Details

#on_options(options) ⇒ Object



14
15
16
# File 'lib/api_def/element.rb', line 14

def on_options(options)
  self.desc options[:desc]
end