Exception: Safemode::SecurityError
- Defined in:
- lib/safemode/exceptions.rb
Constant Summary collapse
- @@types =
{ :const => 'constant', :xstr => 'shell command', :fcall => 'method', :vcall => 'method', :gvar => 'global variable' }
Instance Method Summary collapse
-
#initialize(type, value = nil) ⇒ SecurityError
constructor
A new instance of SecurityError.
Constructor Details
#initialize(type, value = nil) ⇒ SecurityError
Returns a new instance of SecurityError.
11 12 13 14 |
# File 'lib/safemode/exceptions.rb', line 11 def initialize(type, value = nil) type = @@types[type] if @@types.include?(type) super "Safemode doesn't allow to access '#{type}'" + (value ? " on #{value}" : '') end |