Class: RMuh::ServerStats::Advanced
- Defined in:
- lib/rmuh/serverstats/advanced.rb
Overview
This is an advanced extension of the Base class. This adds the ability to access the top level keys returned from the server using dot notation
No additions / alterations exist to the methods from the Base class
Constant Summary
Constants inherited from Base
Instance Method Summary collapse
Methods inherited from Base
#initialize, #stats, #update_cache
Constructor Details
This class inherits a constructor from RMuh::ServerStats::Base
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args, &block) ⇒ Object
13 14 15 16 |
# File 'lib/rmuh/serverstats/advanced.rb', line 13 def method_missing(method, *args, &block) super unless stats.key?(method.to_s) stats[method.to_s] end |