Exception: PgVerify::Interpret::InvalidDSL_expression

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

Instance Method Summary collapse

Methods inherited from Core::Error

#to_formatted

Constructor Details

#initialize(type, message) ⇒ InvalidDSL_expression

Returns a new instance of InvalidDSL_expression.



88
89
90
# File 'lib/pg-verify/interpret/interpret.rb', line 88

def initialize(type, message)
    @type, @message = type, message
end

Instance Method Details

#formattedObject



91
92
93
94
95
96
97
# File 'lib/pg-verify/interpret/interpret.rb', line 91

def formatted()
    hint = [ "Define #{@type}s like this:" ]
    hint << "#{@type} <expression>"
    hint << "  where"
    hint << "  <expression> is a valid expression as a string or symbol"
    return @message, nil, hint.join("\n")
end