Class: HamlLint::RubyExtraction::ImplicitEndChunk

Inherits:
BaseChunk
  • Object
show all
Defined in:
lib/haml_lint/ruby_extraction/implicit_end_chunk.rb

Overview

HAML adds a ‘end` when code gets outdented. We need to add that to the Ruby too, this is the chunk for it. However:

  • we can’t apply fixes to it, so there are no markers

  • this is a distinct class so that a ScriptChunk can fuse this ImplicitEnd into itself, So that we can generate bigger chunks of uninterrupted Ruby.

Constant Summary

Constants inherited from BaseChunk

BaseChunk::COMMA_CHANGES_LINES

Instance Attribute Summary

Attributes inherited from BaseChunk

#end_marker_indent, #haml_line_index, #node, #ruby_lines, #start_marker_line_number

Instance Method Summary collapse

Methods inherited from BaseChunk

#assemble_in, #full_assemble, #fuse, #haml_end_line_index, #initialize, #nb_haml_lines, #skip_line_indexes_in_source_map, #start_marker_indent, #transfer_correction_logic

Constructor Details

This class inherits a constructor from HamlLint::RubyExtraction::BaseChunk

Instance Method Details

#transfer_correction(coordinator, all_corrected_ruby_lines, haml_lines) ⇒ Object



15
# File 'lib/haml_lint/ruby_extraction/implicit_end_chunk.rb', line 15

def transfer_correction(coordinator, all_corrected_ruby_lines, haml_lines); end

#wrap_in_markersObject



11
12
13
# File 'lib/haml_lint/ruby_extraction/implicit_end_chunk.rb', line 11

def wrap_in_markers
  false
end