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.15.3 lib/node_mutation/action/noop_action.rb
node_mutation-1.15.2 lib/node_mutation/action/noop_action.rb
node_mutation-1.15.1 lib/node_mutation/action/noop_action.rb
node_mutation-1.15.0 lib/node_mutation/action/noop_action.rb
node_mutation-1.14.0 lib/node_mutation/action/noop_action.rb
node_mutation-1.13.2 lib/node_mutation/action/noop_action.rb
node_mutation-1.13.1 lib/node_mutation/action/noop_action.rb
node_mutation-1.13.0 lib/node_mutation/action/noop_action.rb
node_mutation-1.12.3 lib/node_mutation/action/noop_action.rb
node_mutation-1.12.2 lib/node_mutation/action/noop_action.rb
node_mutation-1.12.1 lib/node_mutation/action/noop_action.rb
node_mutation-1.12.0 lib/node_mutation/action/noop_action.rb
node_mutation-1.11.0 lib/node_mutation/action/noop_action.rb
node_mutation-1.10.1 lib/node_mutation/action/noop_action.rb
node_mutation-1.10.0 lib/node_mutation/action/noop_action.rb
node_mutation-1.9.3 lib/node_mutation/action/noop_action.rb
node_mutation-1.9.2 lib/node_mutation/action/noop_action.rb
node_mutation-1.9.1 lib/node_mutation/action/noop_action.rb
node_mutation-1.9.0 lib/node_mutation/action/noop_action.rb
node_mutation-1.8.2 lib/node_mutation/action/noop_action.rb