Class: Useless::Doc::DSL::Body
- Inherits:
-
Object
- Object
- Useless::Doc::DSL::Body
show all
- Includes:
- Member
- Defined in:
- lib/useless/doc/dsl.rb
Instance Method Summary
collapse
Methods included from Member
#generate, included, #initialize
Instance Method Details
#attribute(key, description, attributes = {}) ⇒ Object
327
328
329
330
|
# File 'lib/useless/doc/dsl.rb', line 327
def attribute(key, description, attributes = {})
attribute = Doc::Core::Body::Attribute.new attributes.merge(key: key, description: description)
@attributes[:attributes] << attribute
end
|
#content_type(value) ⇒ Object
323
324
325
|
# File 'lib/useless/doc/dsl.rb', line 323
def content_type(value)
@attributes[:content_type] = value
end
|
#default_attributes ⇒ Object
319
320
321
|
# File 'lib/useless/doc/dsl.rb', line 319
def default_attributes
{ attributes: [] }
end
|