Class: Useless::Doc::DSL::Response
- Inherits:
-
Object
- Object
- Useless::Doc::DSL::Response
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
#body(&block) ⇒ Object
296
297
298
|
# File 'lib/useless/doc/dsl.rb', line 296
def body(&block)
@attributes[:body] = Body.build({}, &block)
end
|
#code(code) ⇒ Object
283
284
285
|
# File 'lib/useless/doc/dsl.rb', line 283
def code(code)
@attributes[:code] = code
end
|
#default_attributes ⇒ Object
279
280
281
|
# File 'lib/useless/doc/dsl.rb', line 279
def default_attributes
{ headers: [] }
end
|
#description(description) ⇒ Object
287
288
289
|
# File 'lib/useless/doc/dsl.rb', line 287
def description(description)
@attributes[:description] = description
end
|
291
292
293
294
|
# File 'lib/useless/doc/dsl.rb', line 291
def (key, description)
= Doc::Core::Header.new key: key, description: description
@attributes[:headers] <<
end
|