Class: OpenAPISourceTools::OutputConfiguration

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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_characterObject (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_stepObject (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

#tabObject (readonly)

Returns the value of attribute tab.



12
13
14
# File 'lib/openapi/sourcetools/output.rb', line 12

def tab
  @tab
end

#tab_replaces_countObject (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