Class: RuboCop::Cop::Migration::RemoveColumn::Parser
- Inherits:
-
Object
- Object
- RuboCop::Cop::Migration::RemoveColumn::Parser
- Defined in:
- lib/rubocop/cop/migration/remove_column.rb
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ RuboCop::AST::Node
-
#initialize(content:, parser_engine:, path:, target_ruby_version:) ⇒ Parser
constructor
A new instance of Parser.
Constructor Details
#initialize(content:, parser_engine:, path:, target_ruby_version:) ⇒ Parser
Returns a new instance of Parser.
211 212 213 214 215 216 217 218 219 220 221 |
# File 'lib/rubocop/cop/migration/remove_column.rb', line 211 def initialize( content:, parser_engine:, path:, target_ruby_version: ) @content = content @parser_engine = parser_engine @path = path @target_ruby_version = target_ruby_version end |
Class Method Details
.call(content:, parser_engine:, path:, target_ruby_version:) ⇒ RuboCop::AST::Node
192 193 194 195 196 197 198 199 200 201 202 203 204 |
# File 'lib/rubocop/cop/migration/remove_column.rb', line 192 def call( content:, parser_engine:, path:, target_ruby_version: ) new( content: content, parser_engine: parser_engine, path: path, target_ruby_version: target_ruby_version ).call end |
Instance Method Details
#call ⇒ RuboCop::AST::Node
224 225 226 227 228 229 230 231 |
# File 'lib/rubocop/cop/migration/remove_column.rb', line 224 def call ::RuboCop::ProcessedSource.new( @content, @target_ruby_version, @path, parser_engine: @parser_engine ).ast end |