module Cardio::Generators::ClassMethods
methods shared across Generator bases (which inherit from Rails
generator classes)
Public Instance Methods
namespace(name=nil)
click to toggle source
Override Rails
namespace handling so we can put generators in ‘module Cardio`
Calls superclass method
# File lib/cardio/generators.rb, line 33 def namespace name=nil return super if name @namespace ||= super.sub(/cardio:/, "") end
source_root(path=nil)
click to toggle source
# File lib/cardio/generators.rb, line 11 def source_root path=nil if path @_card_source_root = path else @_card_source_root ||= File.expand_path( "../../generators/#{generator_name}/templates", __FILE__ ) end end