Class: Sinicum::InstallGenerator

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

Overview

Private: Generator to install all Sinicum-related files to a Rails project.

Constant Summary collapse

GROUP_ID =
"com.company"
ARTIFACT_ID =
"myProject"
PROJECT_NAME =
"My Sinicum Project"
MODULE_NAME =
"myproject"
DB_HOST =
"localhost"

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#artifact_idObject

Returns the value of attribute artifact_id.



14
15
16
# File 'lib/generators/sinicum/install_generator.rb', line 14

def artifact_id
  @artifact_id
end

#db_hostObject

Returns the value of attribute db_host.



14
15
16
# File 'lib/generators/sinicum/install_generator.rb', line 14

def db_host
  @db_host
end

#db_passwordObject

Returns the value of attribute db_password.



14
15
16
# File 'lib/generators/sinicum/install_generator.rb', line 14

def db_password
  @db_password
end

#group_idObject

Returns the value of attribute group_id.



14
15
16
# File 'lib/generators/sinicum/install_generator.rb', line 14

def group_id
  @group_id
end

#module_nameObject

Returns the value of attribute module_name.



14
15
16
# File 'lib/generators/sinicum/install_generator.rb', line 14

def module_name
  @module_name
end

#project_nameObject

Returns the value of attribute project_name.



14
15
16
# File 'lib/generators/sinicum/install_generator.rb', line 14

def project_name
  @project_name
end

Instance Method Details

#start_installObject



17
18
19
20
21
22
23
24
# File 'lib/generators/sinicum/install_generator.rb', line 17

def start_install
  user_questions
  create_basic_files
  create_mgnl_config
  create_rails_files
  update_gitignore
  create_template_files if @templates == "yes"
end