Exception: Hanami::CLI::RubyFileGenerator::GeneratedUnparseableCodeError

Inherits:
Error
  • Object
show all
Defined in:
lib/hanami/cli/ruby_file_generator.rb

Overview

Since:

  • 2.0.0

Instance Method Summary collapse

Constructor Details

#initialize(source_code) ⇒ GeneratedUnparseableCodeError

Returns a new instance of GeneratedUnparseableCodeError.

Since:

  • 2.0.0



11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/hanami/cli/ruby_file_generator.rb', line 11

def initialize(source_code)
  super(
    "      Sorry, the code we generated is not valid Ruby.\n\n      Here's what we got:\n\n      \#{source_code}\n\n      Please fix the errors and try again.\n    ERROR_MESSAGE\n  )\nend\n"