Sha256: 0448eac98b337962ec1be4f8276e3148144b3728f768039bf08a3c93f302c5d4

Contents?: true

Size: 508 Bytes

Versions: 54

Compression:

Stored size: 508 Bytes

Contents

# frozen_string_literal: true

# NoopAction to do no operation.
class NodeMutation::NoopAction < NodeMutation::Action
  # Create a NoopAction
  def initialize(node)
    super(node, nil)
  end

  # The rewritten source code with proper indent.
  #
  # @return [String] rewritten code.
  def new_code
    return nil
  end

  private

  # Calculate the begin the end positions.
  def calculate_position
    @start = NodeMutation.adapter.get_start(@node)
    @end = NodeMutation.adapter.get_end(@node)
  end
end

Version data entries

54 entries across 54 versions & 1 rubygems

Version Path
node_mutation-1.21.6 lib/node_mutation/action/noop_action.rb
node_mutation-1.21.5 lib/node_mutation/action/noop_action.rb
node_mutation-1.21.4 lib/node_mutation/action/noop_action.rb
node_mutation-1.21.3 lib/node_mutation/action/noop_action.rb
node_mutation-1.21.2 lib/node_mutation/action/noop_action.rb
node_mutation-1.21.1 lib/node_mutation/action/noop_action.rb
node_mutation-1.21.0 lib/node_mutation/action/noop_action.rb
node_mutation-1.20.0 lib/node_mutation/action/noop_action.rb
node_mutation-1.19.4 lib/node_mutation/action/noop_action.rb
node_mutation-1.19.3 lib/node_mutation/action/noop_action.rb
node_mutation-1.19.2 lib/node_mutation/action/noop_action.rb
node_mutation-1.19.1 lib/node_mutation/action/noop_action.rb
node_mutation-1.19.0 lib/node_mutation/action/noop_action.rb
node_mutation-1.18.3 lib/node_mutation/action/noop_action.rb
node_mutation-1.18.2 lib/node_mutation/action/noop_action.rb
node_mutation-1.18.1 lib/node_mutation/action/noop_action.rb
node_mutation-1.18.0 lib/node_mutation/action/noop_action.rb
node_mutation-1.17.1 lib/node_mutation/action/noop_action.rb
node_mutation-1.17.0 lib/node_mutation/action/noop_action.rb
node_mutation-1.16.0 lib/node_mutation/action/noop_action.rb