Sha256: 3ae953308a46cfc2a1b1a2718a0f9b1e39b9502b03bbc0355db83739ba52fb68
Contents?: true
Size: 618 Bytes
Versions: 16
Compression:
Stored size: 618 Bytes
Contents
# encoding: utf-8 module Synvert::Core # InsertAfterAction to insert code next to the node. class Rewriter::InsertAfterAction < Rewriter::Action # Begin position to insert code. # # @return [Integer] begin position. def begin_pos @node.loc.expression.end_pos end # End position, always same to begin position. # # @return [Integer] end position. def end_pos begin_pos end private # Indent of the node. # # @param node [Parser::AST::Node] # @return [String] n times whitesphace def indent(node) ' ' * node.indent end end end
Version data entries
16 entries across 16 versions & 1 rubygems