Sha256: f22493951999b8ffa4ff697495c415eabe4e7f9f2b8b644884534a8b76e96520

Contents?: true

Size: 319 Bytes

Versions: 6

Compression:

Stored size: 319 Bytes

Contents

module CyberarmEngine
  class Stats
    @@hash = {
      gui_recalculations_last_frame: 0
    }

    def self.get(key)
      @@hash.dig(key)
    end

    def self.increment(key, n)
      @@hash[key] += n
    end

    def self.clear
      @@hash.each do |key, _value|
        @@hash[key] = 0
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
cyberarm_engine-0.19.0 lib/cyberarm_engine/stats.rb
cyberarm_engine-0.18.0 lib/cyberarm_engine/stats.rb
cyberarm_engine-0.17.1 lib/cyberarm_engine/stats.rb
cyberarm_engine-0.17.0 lib/cyberarm_engine/stats.rb
cyberarm_engine-0.16.0 lib/cyberarm_engine/stats.rb
cyberarm_engine-0.15.0 lib/cyberarm_engine/stats.rb