Class: Yoker::Generators::Database::Sqlite
- Inherits:
-
Object
- Object
- Yoker::Generators::Database::Sqlite
- Defined in:
- lib/yoker/generators/database/sqlite.rb
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#shell ⇒ Object
readonly
Returns the value of attribute shell.
Instance Method Summary collapse
- #generate ⇒ Object
-
#initialize(config, shell) ⇒ Sqlite
constructor
A new instance of Sqlite.
Constructor Details
#initialize(config, shell) ⇒ Sqlite
9 10 11 12 |
# File 'lib/yoker/generators/database/sqlite.rb', line 9 def initialize(config, shell) @config = config @shell = shell end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
7 8 9 |
# File 'lib/yoker/generators/database/sqlite.rb', line 7 def config @config end |
#shell ⇒ Object (readonly)
Returns the value of attribute shell.
7 8 9 |
# File 'lib/yoker/generators/database/sqlite.rb', line 7 def shell @shell end |
Instance Method Details
#generate ⇒ Object
14 15 16 17 18 19 |
# File 'lib/yoker/generators/database/sqlite.rb', line 14 def generate generate_database_yml generate_sqlite_optimizations if needs_optimizations? create_database_directory generate_backup_script if config[:backup_existing] end |