Module: Prism::Merge::MagicCommentSupport

Defined in:
lib/prism/merge/magic_comment_support.rb

Overview

Compatibility wrapper for Ruby substrate magic-comment support.

Class Method Summary collapse

Class Method Details

.comment_only_prefix_info(lines) ⇒ Object



13
14
15
# File 'lib/prism/merge/magic_comment_support.rb', line 13

def comment_only_prefix_info(lines)
  Ruby::Merge::MagicCommentSupport.comment_only_prefix_info(lines)
end

.header_magic_comment_types_for_lines(lines) ⇒ Object



17
18
19
# File 'lib/prism/merge/magic_comment_support.rb', line 17

def header_magic_comment_types_for_lines(lines)
  Ruby::Merge::MagicCommentSupport.header_magic_comment_types_for_lines(lines)
end

.magic_comment_type_for_text(text) ⇒ Object



9
10
11
# File 'lib/prism/merge/magic_comment_support.rb', line 9

def magic_comment_type_for_text(text)
  Ruby::Merge::MagicCommentSupport.magic_comment_type_for_text(text)
end

.prefix_comment_line_numbers_for_comments(comments) ⇒ Object



21
22
23
# File 'lib/prism/merge/magic_comment_support.rb', line 21

def prefix_comment_line_numbers_for_comments(comments)
  Ruby::Merge::MagicCommentSupport.prefix_comment_line_numbers_for_comments(comments)
end

.shebang_comment?(comment) ⇒ Boolean

Returns:

  • (Boolean)


29
30
31
# File 'lib/prism/merge/magic_comment_support.rb', line 29

def shebang_comment?(comment)
  Ruby::Merge::MagicCommentSupport.shebang_comment?(comment)
end

.shebang_line?(line) ⇒ Boolean

Returns:

  • (Boolean)


25
26
27
# File 'lib/prism/merge/magic_comment_support.rb', line 25

def shebang_line?(line)
  Ruby::Merge::MagicCommentSupport.shebang_line?(line)
end