class Generators::Avo::Card
def card_types
def card_types %w[metric chartkick partial] end
def handle
def handle raise "Invalid card type '#{options[:type]}'" unless card_types.include? options[:type] template "cards/#{options[:type]}_card_sample.tt", "app/avo/cards/#{name.underscore}.rb" if options[:type].to_sym == :partial template "cards/partial_card_partial.tt", "app/views/avo/cards/_#{name.underscore}.html.erb" end end