Class: Auth::Generators::ConfigurationGenerator

Inherits:
Rails::Generator::Base
  • Object
show all
Defined in:
lib/auth/generators/configuration_generator.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args, options = {}) ⇒ ConfigurationGenerator

Returns a new instance of ConfigurationGenerator.



4
5
6
# File 'lib/auth/generators/configuration_generator.rb', line 4

def initialize(args, options = {})
  super(args, options)
end

Instance Attribute Details

#modelObject (readonly)

Returns the value of attribute model.



2
3
4
# File 'lib/auth/generators/configuration_generator.rb', line 2

def model
  @model
end

Instance Method Details

#manifestObject



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

def manifest
  record do |m|
    m.directory "lib/tasks"
    m.directory "config/initializers"
    m.file "tasks/migrations.rb", "lib/tasks/sparkly_migration.rb"
    m.file 'initializer.rb', 'config/initializers/sparkly_authentication.rb'
  end
end

#specObject



17
18
19
# File 'lib/auth/generators/configuration_generator.rb', line 17

def spec
  @spec ||= Rails::Generator::Spec.new("configuration", File.join(Auth.path, "auth/generators"), nil)
end