Class: Gamefic::Sdk::Server

Inherits:
Sinatra::Base
  • Object
show all
Defined in:
lib/gamefic-sdk/server.rb

Instance Method Summary collapse

Instance Method Details

#reset_featuresObject



55
56
57
58
59
60
61
62
63
# File 'lib/gamefic-sdk/server.rb', line 55

def reset_features
  @@old_features ||= $LOADED_FEATURES.clone
  @@old_constants ||= Object.constants(false)
  $LOADED_FEATURES.keep_if { |e| @@old_features.include?(e) }
  Object.constants(false).each do |const|
    Object.send(:remove_const, const) unless @@old_constants.include?(const)
  end
  Gamefic::Plot.blocks.clear
end