lib/generators/rails/parser_generator.rb in decanter-2.1.2 vs lib/generators/rails/parser_generator.rb in decanter-3.0.0

- old
+ new

@@ -1,13 +1,11 @@ -# frozen_string_literal: true - module Rails module Generators class ParserGenerator < NamedBase - source_root File.expand_path('templates', __dir__) - check_class_collision suffix: 'Parser' + source_root File.expand_path('../templates', __FILE__) + check_class_collision :suffix => 'Parser' - class_option :parent, type: :string, desc: 'The parent class for the generated parser' + class_option :parent, :type => :string, :desc => 'The parent class for the generated parser' def create_parser_file template 'parser.rb.erb', File.join('lib/decanter/parsers', class_path, "#{file_name}_parser.rb") end