Class: Oppen::Config
- Inherits:
-
Object
- Object
- Oppen::Config
- Defined in:
- lib/oppen.rb
Overview
Config.
Defined Under Namespace
Modules: IndentAnchor
Instance Attribute Summary collapse
-
#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, upsize_stack: true) ⇒ Config
Default config for Wadler usage.
Instance Method Summary collapse
-
#eager_print? ⇒ Boolean
Print groups eagerly.
-
#initialize(indent_anchor: IndentAnchor::ON_BREAK, eager_print: false, upsize_stack: false) ⇒ Config
constructor
A new instance of Config.
- #upsize_stack? ⇒ Boolean
Constructor Details
#initialize(indent_anchor: IndentAnchor::ON_BREAK, eager_print: false, upsize_stack: false) ⇒ Config
Returns a new instance of Config.
54 55 56 57 58 |
# File 'lib/oppen.rb', line 54 def initialize(indent_anchor: IndentAnchor::ON_BREAK, eager_print: false, upsize_stack: false) @indent_anchor = indent_anchor @eager_print = eager_print @upsize_stack = upsize_stack end |
Instance Attribute Details
#indent_anchor ⇒ Object
Returns the value of attribute indent_anchor.
52 53 54 |
# File 'lib/oppen.rb', line 52 def indent_anchor @indent_anchor end |
Class Method Details
.oppen ⇒ Config
Default config for Oppen usage
95 96 97 |
# File 'lib/oppen.rb', line 95 def self.oppen new end |
.wadler(eager_print: true, upsize_stack: true) ⇒ Config
Default config for Wadler usage
101 102 103 |
# File 'lib/oppen.rb', line 101 def self.wadler(eager_print: true, upsize_stack: true) new(indent_anchor: IndentAnchor::ON_BEGIN, eager_print:, upsize_stack:) end |
Instance Method Details
#eager_print? ⇒ Boolean
Print groups eagerly
89 |
# File 'lib/oppen.rb', line 89 def eager_print? = @eager_print |
#upsize_stack? ⇒ Boolean
91 |
# File 'lib/oppen.rb', line 91 def upsize_stack? = @upsize_stack |