Sha256: 60b476b1893fc64f31d4ee9ad94490651079f435e4b24ae89ff759ea886fa5e9

Contents?: true

Size: 587 Bytes

Versions: 14

Compression:

Stored size: 587 Bytes

Contents

# frozen_string_literal: true

# NoopAction to do no operation.
class NodeMutation::NoopAction < NodeMutation::Action
  # Initialize a NoopAction.
  #
  # @param node [Node]
  # @param adapter [NodeMutation::Adapter]
  def initialize(node, adapter:)
    super(node, nil, adapter: adapter)
  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 = @adapter.get_start(@node)
    @end = @adapter.get_end(@node)
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
node_mutation-1.24.4 lib/node_mutation/action/noop_action.rb
node_mutation-1.24.3 lib/node_mutation/action/noop_action.rb
node_mutation-1.24.2 lib/node_mutation/action/noop_action.rb
node_mutation-1.24.1 lib/node_mutation/action/noop_action.rb
node_mutation-1.24.0 lib/node_mutation/action/noop_action.rb
node_mutation-1.23.3 lib/node_mutation/action/noop_action.rb
node_mutation-1.23.2 lib/node_mutation/action/noop_action.rb
node_mutation-1.23.1 lib/node_mutation/action/noop_action.rb
node_mutation-1.23.0 lib/node_mutation/action/noop_action.rb
node_mutation-1.22.4 lib/node_mutation/action/noop_action.rb
node_mutation-1.22.3 lib/node_mutation/action/noop_action.rb
node_mutation-1.22.2 lib/node_mutation/action/noop_action.rb
node_mutation-1.22.1 lib/node_mutation/action/noop_action.rb
node_mutation-1.22.0 lib/node_mutation/action/noop_action.rb