Class: Unparser::Writer::DynamicString
- Inherits:
-
Object
- Object
- Unparser::Writer::DynamicString
- Includes:
- Adamantium, Unparser::Writer
- Defined in:
- lib/unparser/writer/dynamic_string.rb
Constant Summary collapse
- PATTERNS_2 =
[ %i[str_empty begin].freeze, %i[begin str_nl].freeze ].freeze
- PATTERNS_3 =
[ %i[begin str_nl_eol str_nl_eol].freeze, %i[str_nl_eol begin str_nl_eol].freeze, %i[str_ws begin str_nl_eol].freeze ].freeze
- FLAT_INTERPOLATION =
%i[ivar cvar gvar nth_ref].to_set.freeze
Constants included from Generation
Instance Method Summary collapse
Methods included from Unparser::Writer
Methods included from Generation
#emit_heredoc_reminders, #symbol_name, #write_to_buffer
Methods included from NodeHelpers
#n, #n?, #s, #unwrap_single_begin
Instance Method Details
#dispatch ⇒ Object
32 33 34 35 36 37 38 |
# File 'lib/unparser/writer/dynamic_string.rb', line 32 def dispatch if heredoc? emit_heredoc_header else emit_dstr end end |
#emit_heredoc_reminder ⇒ Object
25 26 27 28 29 30 |
# File 'lib/unparser/writer/dynamic_string.rb', line 25 def emit_heredoc_reminder return unless heredoc? emit_heredoc_body end |