Module: RailsLogConverter::CLI::Execute
- Included in:
- RailsLogConverter::CLI
- Defined in:
- lib/rails_log_converter/cli/execute.rb
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(receiver) ⇒ Object
4 5 6 |
# File 'lib/rails_log_converter/cli/execute.rb', line 4 def self.included(receiver) receiver.extend ClassMethods end |
Instance Method Details
#close_database ⇒ Object
46 47 48 |
# File 'lib/rails_log_converter/cli/execute.rb', line 46 def close_database CLI.close_database end |
#create_database ⇒ Object
37 38 39 40 41 42 43 44 |
# File 'lib/rails_log_converter/cli/execute.rb', line 37 def create_database CLI.setup_logger path = "#{directory_path}/#{database_name}" File.delete path if File.exists?(path) CLI.create_database(path) end |
#execute! ⇒ Object
52 53 54 55 56 57 |
# File 'lib/rails_log_converter/cli/execute.rb', line 52 def execute! create_database Parser.parse_file(file_path) close_database UI.puts "[DONE]" end |