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
304
305
306
307
|
# File 'lib/useless/doc/dsl.rb', line 304
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
300
301
302
|
# File 'lib/useless/doc/dsl.rb', line 300
def content_type(value)
@attributes[:content_type] = value
end
|
#default_attributes ⇒ Object
296
297
298
|
# File 'lib/useless/doc/dsl.rb', line 296
def default_attributes
{ attributes: [] }
end
|