Exception: PgVerify::Interpret::InvalidDSL_model

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_model

Returns a new instance of InvalidDSL_model.



101
102
103
# File 'lib/pg-verify/interpret/interpret.rb', line 101

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

Instance Method Details

#formattedObject



104
105
106
107
108
109
110
# File 'lib/pg-verify/interpret/interpret.rb', line 104

def formatted()
    hint = [ "Define models like this:" ]
    hint << "model <name> do ... end"
    hint << "  where"
    hint << "  <name> is a string or symbol"
    return @message, nil, hint.join("\n")
end