Class: Expressir::Express::PrettyFormatter::Configuration
- Inherits:
-
Object
- Object
- Expressir::Express::PrettyFormatter::Configuration
- Defined in:
- lib/expressir/express/pretty_formatter.rb
Overview
Configuration class for MECE parameter management Follows the hierarchy: Options > ENV > Defaults
Instance Attribute Summary collapse
-
#indent ⇒ Object
Returns the value of attribute indent.
-
#insert_newline ⇒ Object
Returns the value of attribute insert_newline.
-
#insert_space ⇒ Object
Returns the value of attribute insert_space.
-
#line_length ⇒ Object
Returns the value of attribute line_length.
-
#provenance_enabled ⇒ Object
Returns the value of attribute provenance_enabled.
-
#provenance_name ⇒ Object
Returns the value of attribute provenance_name.
-
#provenance_version ⇒ Object
Returns the value of attribute provenance_version.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Configuration
constructor
Initialize configuration with options, environment variables, or defaults.
Constructor Details
#initialize(options = {}) ⇒ Configuration
Initialize configuration with options, environment variables, or defaults
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/expressir/express/pretty_formatter.rb', line 14 def initialize( = {}) @indent = resolve_param(, :indent, "EXPRESSIR_INDENT", 4) @line_length = resolve_param(, :line_length, "EXPRESSIR_LINE_LENGTH", nil) @insert_newline = resolve_param(, :insert_newline, "EXPRESSIR_INSERT_NEWLINE", true) @insert_space = resolve_param(, :insert_space, "EXPRESSIR_INSERT_SPACE", true) @provenance_enabled = resolve_param(, :provenance, "EXPRESSIR_PROVENANCE", true) @provenance_name = resolve_param(, :provenance_name, "EXPRESSIR_PROVENANCE_NAME", "Expressir") @provenance_version = resolve_param(, :provenance_version, "EXPRESSIR_PROVENANCE_VERSION", Expressir::VERSION) end |
Instance Attribute Details
#indent ⇒ Object
Returns the value of attribute indent.
9 10 11 |
# File 'lib/expressir/express/pretty_formatter.rb', line 9 def indent @indent end |
#insert_newline ⇒ Object
Returns the value of attribute insert_newline.
9 10 11 |
# File 'lib/expressir/express/pretty_formatter.rb', line 9 def insert_newline @insert_newline end |
#insert_space ⇒ Object
Returns the value of attribute insert_space.
9 10 11 |
# File 'lib/expressir/express/pretty_formatter.rb', line 9 def insert_space @insert_space end |
#line_length ⇒ Object
Returns the value of attribute line_length.
9 10 11 |
# File 'lib/expressir/express/pretty_formatter.rb', line 9 def line_length @line_length end |
#provenance_enabled ⇒ Object
Returns the value of attribute provenance_enabled.
9 10 11 |
# File 'lib/expressir/express/pretty_formatter.rb', line 9 def provenance_enabled @provenance_enabled end |
#provenance_name ⇒ Object
Returns the value of attribute provenance_name.
9 10 11 |
# File 'lib/expressir/express/pretty_formatter.rb', line 9 def provenance_name @provenance_name end |
#provenance_version ⇒ Object
Returns the value of attribute provenance_version.
9 10 11 |
# File 'lib/expressir/express/pretty_formatter.rb', line 9 def provenance_version @provenance_version end |