Class: Synvert::Core::Rewriter::ReplaceErbStmtWithExprAction
- Inherits:
-
NodeMutation::Action
- Object
- NodeMutation::Action
- Synvert::Core::Rewriter::ReplaceErbStmtWithExprAction
- Defined in:
- lib/synvert/core/rewriter/action/replace_erb_stmt_with_expr_action.rb
Overview
ReplaceErbStmtWithExprAction to replace erb stmt code to expr,
Instance Method Summary collapse
-
#initialize(node, erb_source, adapter:) ⇒ ReplaceErbStmtWithExprAction
constructor
Initialize a ReplaceErbStmtWithExprAction.
-
#new_code ⇒ String
The new erb expr code.
Constructor Details
#initialize(node, erb_source, adapter:) ⇒ ReplaceErbStmtWithExprAction
Initialize a ReplaceErbStmtWithExprAction.
13 14 15 16 17 |
# File 'lib/synvert/core/rewriter/action/replace_erb_stmt_with_expr_action.rb', line 13 def initialize(node, erb_source, adapter:) super(node, nil, adapter: adapter) @erb_source = erb_source @type = :insert end |
Instance Method Details
#new_code ⇒ String
The new erb expr code.
22 23 24 |
# File 'lib/synvert/core/rewriter/action/replace_erb_stmt_with_expr_action.rb', line 22 def new_code '=' end |