Module: Jade::Formatter::KeyedCall
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
23 24 25 26 27 28 29 |
# File 'lib/jade/formatter/calls.rb', line 23 def format(node, indent:, source:) node => AST::KeyedCall(callee:, fields:, trailing_comma:) callee_str = format_node(callee, source:) field_strs = fields.map { "#{it.key}: #{format_node(it.value, source:)}" } Calls.render(callee_str, field_strs, trailing_comma, indent) end |