Module: Card::Generators::ClassMethods
- Included in:
- MigrationBase, NamedBase
- Defined in:
- lib/generators/card.rb
Instance Method Summary collapse
-
#banner ⇒ Object
Override Rails default banner (wagn is the command name).
- #source_root(path = nil) ⇒ Object
Instance Method Details
#banner ⇒ Object
Override Rails default banner (wagn is the command name).
18 19 20 |
# File 'lib/generators/card.rb', line 18 def "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.(File.join(File.dirname(__FILE__), "card", generator_name, "templates")) end end |