Exception: PgVerify::Interpret::InvalidDSL_state

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(message) ⇒ InvalidDSL_state

Returns a new instance of InvalidDSL_state.



51
52
53
# File 'lib/pg-verify/interpret/interpret.rb', line 51

def initialize(message)
    @message = message
end

Instance Method Details

#formattedObject



54
55
56
57
58
59
60
# File 'lib/pg-verify/interpret/interpret.rb', line 54

def formatted()
    hint = [ "Define states like this:" ]
    hint << "states <states>"
    hint << "  where:"
    hint << "  <states> is an array of symbols like :on, :off"
    return @message, nil, hint.join("\n")
end