Class: RspecApiDocumentation::Writers::Writer
- Inherits:
-
Object
- Object
- RspecApiDocumentation::Writers::Writer
- Defined in:
- lib/rspec_api_documentation/writers/writer.rb
Direct Known Subclasses
CombinedJsonWriter, CombinedTextWriter, GeneralMarkupWriter, JSONWriter, JsonIodocsWriter, OpenApiWriter
Instance Attribute Summary collapse
-
#configuration ⇒ Object
Returns the value of attribute configuration.
-
#index ⇒ Object
Returns the value of attribute index.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(index, configuration) ⇒ Writer
constructor
A new instance of Writer.
Constructor Details
#initialize(index, configuration) ⇒ Writer
Returns a new instance of Writer.
6 7 8 9 |
# File 'lib/rspec_api_documentation/writers/writer.rb', line 6 def initialize(index, configuration) self.index = index self.configuration = configuration end |
Instance Attribute Details
#configuration ⇒ Object
Returns the value of attribute configuration.
4 5 6 |
# File 'lib/rspec_api_documentation/writers/writer.rb', line 4 def configuration @configuration end |
#index ⇒ Object
Returns the value of attribute index.
4 5 6 |
# File 'lib/rspec_api_documentation/writers/writer.rb', line 4 def index @index end |
Class Method Details
.clear_docs(docs_dir) ⇒ Object
16 17 18 19 20 21 |
# File 'lib/rspec_api_documentation/writers/writer.rb', line 16 def self.clear_docs(docs_dir) if File.exists?(docs_dir) FileUtils.rm_rf(docs_dir, :secure => true) end FileUtils.mkdir_p(docs_dir) end |
.write(index, configuration) ⇒ Object
11 12 13 14 |
# File 'lib/rspec_api_documentation/writers/writer.rb', line 11 def self.write(index, configuration) writer = new(index, configuration) writer.write end |