Class: Grape::Apidoc
- Inherits:
-
Object
- Object
- Grape::Apidoc
- Defined in:
- lib/grape/apidoc.rb
Defined Under Namespace
Classes: RakeTask, TableFormat
Constant Summary collapse
- ENTITY_FIELDS_TABLE =
Field, Type, Description, Values
TableFormat.new([20, 10, 30, 10]).freeze
- ROUTE_FIELDS_TABLE =
Field, Type, Description
TableFormat.new([20, 10, 40]).freeze
Instance Method Summary collapse
-
#initialize(root_api_class = nil, output: $stdout) ⇒ Apidoc
constructor
A new instance of Apidoc.
- #write! ⇒ Object
Constructor Details
#initialize(root_api_class = nil, output: $stdout) ⇒ Apidoc
Returns a new instance of Apidoc.
9 10 11 12 |
# File 'lib/grape/apidoc.rb', line 9 def initialize(root_api_class = nil, output: $stdout) @api = root_api_class || detect_root_api_class @out = output end |
Instance Method Details
#write! ⇒ Object
14 15 16 17 |
# File 'lib/grape/apidoc.rb', line 14 def write! write_entities! if defined?(Grape::Entity) write_routes! end |