Module: Jade::Formatter::VariableReference

Extended by:
Helper, VariableReference
Included in:
VariableReference
Defined in:
lib/jade/formatter/leaves.rb

Overview

Simple leaf nodes: each is at most a one-liner of formatting logic. Grouped here so the per-node directory doesn’t drown in trivia.

Instance Method Summary collapse

Methods included from Helper

and_indent, dispatch_for, format_delimited, format_exposing, format_leading_comments, format_node, format_pattern, format_trailing_comment, format_type, format_type_atom, too_long?

Instance Method Details

#format(node, indent:, source:) ⇒ Object



10
11
12
# File 'lib/jade/formatter/leaves.rb', line 10

def format(node, indent:, source:)
  node.name.then(&and_indent(indent))
end