Class: Yoker::Generators::Database::Mysql
- Inherits:
-
Object
- Object
- Yoker::Generators::Database::Mysql
- Defined in:
- lib/yoker/generators/database/mysql.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) ⇒ Mysql
constructor
A new instance of Mysql.
Constructor Details
#initialize(config, shell) ⇒ Mysql
Returns a new instance of Mysql.
9 10 11 12 |
# File 'lib/yoker/generators/database/mysql.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/mysql.rb', line 7 def config @config end |
#shell ⇒ Object (readonly)
Returns the value of attribute shell.
7 8 9 |
# File 'lib/yoker/generators/database/mysql.rb', line 7 def shell @shell end |
Instance Method Details
#generate ⇒ Object
14 15 16 17 18 |
# File 'lib/yoker/generators/database/mysql.rb', line 14 def generate generate_database_yml generate_init_sql if config[:container] != "none" generate_mysql_config if needs_custom_config? end |