Class: OpenAPISourceTools::OutputConfiguration
- Inherits:
-
Object
- Object
- OpenAPISourceTools::OutputConfiguration
- Defined in:
- lib/openapi/sourcetools/output.rb
Overview
Output configuration settings for easy storage. You can have it in configuration and pass hash to initialize.
Instance Attribute Summary collapse
-
#indent_character ⇒ Object
readonly
Returns the value of attribute indent_character.
-
#indent_step ⇒ Object
readonly
Returns the value of attribute indent_step.
-
#tab ⇒ Object
readonly
Returns the value of attribute tab.
-
#tab_replaces_count ⇒ Object
readonly
Returns the value of attribute tab_replaces_count.
Instance Method Summary collapse
-
#initialize(cfg = {}) ⇒ OutputConfiguration
constructor
A new instance of OutputConfiguration.
Constructor Details
#initialize(cfg = {}) ⇒ OutputConfiguration
Returns a new instance of OutputConfiguration.
14 15 16 17 18 19 |
# File 'lib/openapi/sourcetools/output.rb', line 14 def initialize(cfg = {}) @indent_character = cfg['indent_character'] || ' ' @indent_step = cfg['indent_step'] || 4 @tab = cfg['tab'] || "\t" @tab_replaces_count = cfg['tab_replaces_count'] || 0 end |
Instance Attribute Details
#indent_character ⇒ Object (readonly)
Returns the value of attribute indent_character.
11 12 13 |
# File 'lib/openapi/sourcetools/output.rb', line 11 def indent_character @indent_character end |
#indent_step ⇒ Object (readonly)
Returns the value of attribute indent_step.
11 12 13 |
# File 'lib/openapi/sourcetools/output.rb', line 11 def indent_step @indent_step end |
#tab ⇒ Object (readonly)
Returns the value of attribute tab.
12 13 14 |
# File 'lib/openapi/sourcetools/output.rb', line 12 def tab @tab end |
#tab_replaces_count ⇒ Object (readonly)
Returns the value of attribute tab_replaces_count.
12 13 14 |
# File 'lib/openapi/sourcetools/output.rb', line 12 def tab_replaces_count @tab_replaces_count end |