Sha256: 60b0f20187377e119ff6f19b814ccf7e981d766b44bede2b2e07bcd1e378fca9
Contents?: true
Size: 556 Bytes
Versions: 3
Compression:
Stored size: 556 Bytes
Contents
# frozen_string_literal: true module Rails module Generators class ParserGenerator < NamedBase source_root File.expand_path('templates', __dir__) check_class_collision suffix: '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 private def parent_class_name 'Decanter::Parser::ValueParser' end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
decanter-2.1.2 | lib/generators/rails/parser_generator.rb |
decanter-2.1.1 | lib/generators/rails/parser_generator.rb |
decanter-2.1.0 | lib/generators/rails/parser_generator.rb |