Class: Coradoc::Configurable::OutputConfig
- Inherits:
-
ConfigSection
- Object
- ConfigSection
- Coradoc::Configurable::OutputConfig
- Defined in:
- lib/coradoc/configurable.rb
Overview
Output configuration section
Instance Attribute Summary collapse
-
#default_format ⇒ Symbol
Default output format.
-
#include_metadata ⇒ Boolean
Include metadata in output.
-
#indent ⇒ String
Indentation string.
-
#line_width ⇒ Integer
Line width for text output.
-
#pretty_print ⇒ Boolean
Pretty print output.
Attributes inherited from ConfigSection
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ OutputConfig
constructor
A new instance of OutputConfig.
Methods inherited from ConfigSection
#[], #[]=, #merge!, symbolize_keys, #to_h
Constructor Details
#initialize(options = {}) ⇒ OutputConfig
Returns a new instance of OutputConfig.
193 194 195 196 197 198 199 200 |
# File 'lib/coradoc/configurable.rb', line 193 def initialize( = {}) super @default_format = @options.fetch(:default_format, :html) @pretty_print = @options.fetch(:pretty_print, true) @line_width = @options.fetch(:line_width, 80) @indent = @options.fetch(:indent, ' ') @include_metadata = @options.fetch(:include_metadata, false) end |
Instance Attribute Details
#default_format ⇒ Symbol
Returns Default output format.
179 180 181 |
# File 'lib/coradoc/configurable.rb', line 179 def default_format @default_format end |
#include_metadata ⇒ Boolean
Returns Include metadata in output.
191 192 193 |
# File 'lib/coradoc/configurable.rb', line 191 def @include_metadata end |
#indent ⇒ String
Returns Indentation string.
188 189 190 |
# File 'lib/coradoc/configurable.rb', line 188 def indent @indent end |
#line_width ⇒ Integer
Returns Line width for text output.
185 186 187 |
# File 'lib/coradoc/configurable.rb', line 185 def line_width @line_width end |
#pretty_print ⇒ Boolean
Returns Pretty print output.
182 183 184 |
# File 'lib/coradoc/configurable.rb', line 182 def pretty_print @pretty_print end |