Sha256: 610ec611fb43d853088929d0eac52a134ab40173b008bb46451db8c06e1c0e8c
Contents?: true
Size: 660 Bytes
Versions: 155
Compression:
Stored size: 660 Bytes
Contents
require_relative "named_base_generator" module Generators module Avo class FilterGenerator < NamedBaseGenerator source_root File.expand_path("templates", __dir__) class_option :multiple_select, type: :boolean class_option :select, type: :boolean class_option :text, type: :boolean namespace "avo:filter" def create_resource_file type = "boolean" type = "multiple_select" if options[:multiple_select] type = "select" if options[:select] type = "text" if options[:text] template "filters/#{type}_filter.tt", "app/avo/filters/#{singular_name}.rb" end end end end
Version data entries
155 entries across 155 versions & 1 rubygems