Ameba::Formatter::Util - ameba 1.7.0

# module Ameba::Formatter::Util

##
Extended Modules

- Ameba::Formatter::Util

##
Direct including types

- Ameba::Formatter::DotFormatter
- Ameba::Formatter::ExplainFormatter
- Ameba::Formatter::GitHubActionsFormatter
- Ameba::Presenter::RulePresenter

##
Defined in:

ameba/formatter/util.cr

##
Instance Method Summary

- #affected_code(issue : Issue, context_lines = 0, max_length = 120, ellipsis = " ...", prompt = "> ")
- #affected_code(code, location, end_location = nil, context_lines = 0, max_length = 120, ellipsis = " ...", prompt = "> ")
- #colorize_code_fences(string : String, color : Colorize::Color = :dark_gray)
- #colorize_markdown(string : String, code_color : Colorize::Color = :dark_gray)
- #colorize_text_styles(string : String)
- #context(lines, lineno, context_lines = 3, remove_empty = true)
- #deansify(message : String | Nil) : String | Nil
- #pluralize(count : Int, singular : String, plural = "#{singular}s")
- #to_human(span : Time::Span)
- #trim(str, max_length = 120, ellipsis = " ...")

##
Instance Method Detail

def affected_code(issue : Issue, context_lines = 0, max_length = 120, ellipsis = " ...", prompt = "> ") #
def affected_code(code, location, end_location = nil, context_lines = 0, max_length = 120, ellipsis = " ...", prompt = "> ") #
def colorize_code_fences(string : String, color : Colorize::Color = :dark_gray) #
def colorize_markdown(string : String, code_color : Colorize::Color = :dark_gray) #
def colorize_text_styles(string : String) #
def context(lines, lineno, context_lines = 3, remove_empty = true) #
def deansify(message : String | Nil) : String | Nil #
def pluralize(count : Int, singular : String, plural = "#{singular}s") #
def to_human(span : Time::Span) #
def trim(str, max_length = 120, ellipsis = " ...") #