Sha256: 3ed4c799976a72360949d5e708300984452d3719dbec8c9311b35a0329a7d33f
Contents?: true
Size: 463 Bytes
Versions: 14
Compression:
Stored size: 463 Bytes
Contents
# frozen_string_literal: true module Synvert::Core # InsertAfterAction to insert code next to the node. class Rewriter::InsertAfterAction < Rewriter::Action def calculate_position @begin_pos = @node.loc.expression.end_pos @end_pos = @begin_pos end private # Indent of the node. # # @param node [Parser::AST::Node] # @return [String] n times whitesphace def indent(node) ' ' * node.column end end end
Version data entries
14 entries across 14 versions & 1 rubygems