Exception: PgVerify::NoDefaultFileError

Inherits:
Core::Error
  • Object
show all
Defined in:
lib/pg-verify/cli/cli_utils.rb

Instance Method Summary collapse

Methods inherited from Core::Error

#to_formatted

Constructor Details

#initialize(default_path) ⇒ NoDefaultFileError

Returns a new instance of NoDefaultFileError.



49
50
51
# File 'lib/pg-verify/cli/cli_utils.rb', line 49

def initialize(default_path)
    @default_path = default_path
end

Instance Method Details

#formattedObject



52
53
54
55
56
57
58
# File 'lib/pg-verify/cli/cli_utils.rb', line 52

def formatted()
    title = "Nothing to interpret!"
    body  = "You didn't specify a file to interpret and there is no DSL script\n"
    body += "at the default location: #{@default_path.c_file} (#{File.expand_path(@default_path).c_sidenote})"
    hint = "Make sure to specify another file or specify another path"
    return title, body, hint
end