Exception: PgVerify::Interpret::InvalidDSL_transition

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_transition

Returns a new instance of InvalidDSL_transition.



75
76
77
# File 'lib/pg-verify/interpret/interpret.rb', line 75

def initialize(message)
    @message = message
end

Instance Method Details

#formattedObject



78
79
80
81
82
83
84
# File 'lib/pg-verify/interpret/interpret.rb', line 78

def formatted()
    hint = [ "Define transitions like this:" ]
    hint << "transition <pre-state> => <post-state> do ... end"
    hint << "  where"
    hint << "  <pre-state> & <post-state> are states in this graph, like :on or :off"
    return @message, nil, hint.join("\n")
end