Module: Card::Generators::ClassMethods

Included in:
MigrationBase, NamedBase
Defined in:
lib/generators/card.rb

Instance Method Summary collapse

Instance Method Details

Override Rails default banner (wagn is the command name).



18
19
20
# File 'lib/generators/card.rb', line 18

def banner
  "wagn generate #{namespace} #{arguments.map(&:usage) * ' '} [options]".gsub(/\s+/, ' ')
end

#source_root(path = nil) ⇒ Object



9
10
11
12
13
14
15
# File 'lib/generators/card.rb', line 9

def source_root path=nil
  if path
    @_card_source_root = path
  else
    @_card_source_root ||= File.expand_path(File.join(File.dirname(__FILE__), 'card', generator_name, 'templates'))
  end
end