Class: Oppen::Config
- Inherits:
-
Object
- Object
- Oppen::Config
- Defined in:
- lib/oppen.rb
Overview
Config.
Defined Under Namespace
Modules: IndentAnchor
Instance Attribute Summary collapse
-
#eager_print ⇒ Boolean
Print groups eagerly.
-
#indent_anchor ⇒ Object
Returns the value of attribute indent_anchor.
Class Method Summary collapse
-
.oppen ⇒ Config
Default config for Oppen usage.
-
.wadler(eager_print: true) ⇒ Config
Default config for Wadler usage.
Instance Method Summary collapse
-
#initialize(indent_anchor: IndentAnchor::ON_BREAK, eager_print: false) ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize(indent_anchor: IndentAnchor::ON_BREAK, eager_print: false) ⇒ Config
Returns a new instance of Config.
81 82 83 84 |
# File 'lib/oppen.rb', line 81 def initialize(indent_anchor: IndentAnchor::ON_BREAK, eager_print: false) @indent_anchor = indent_anchor @eager_print = eager_print end |
Instance Attribute Details
#eager_print ⇒ Boolean
Print groups eagerly
79 80 81 |
# File 'lib/oppen.rb', line 79 def eager_print @eager_print end |
#indent_anchor ⇒ Object
Returns the value of attribute indent_anchor.
49 50 51 |
# File 'lib/oppen.rb', line 49 def indent_anchor @indent_anchor end |
Class Method Details
.oppen ⇒ Config
Default config for Oppen usage
88 89 90 |
# File 'lib/oppen.rb', line 88 def self.oppen new end |
.wadler(eager_print: true) ⇒ Config
Default config for Wadler usage
94 95 96 |
# File 'lib/oppen.rb', line 94 def self.wadler(eager_print: true) new(indent_anchor: IndentAnchor::ON_BEGIN, eager_print:) end |