Class: Saucy::Generators::Base

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/saucy/base.rb

Overview

Base generator for Saucy generators. Setups up the source root.

Class Method Summary collapse

Class Method Details

.source_rootString

Returns source root for tempates within a saucy generator.

Returns:

  • (String)

    source root for tempates within a saucy generator



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

def self.source_root
  @_saucy_source_root ||=
    File.expand_path(File.join(File.dirname(__FILE__),
                               generator_name,
                               'templates'))
end