Module: GasStats
- Defined in:
- lib/gas_stats.rb,
lib/gas_stats/version.rb
Constant Summary collapse
- VERSION =
'0.1.0'
Class Method Summary collapse
- .add ⇒ Object
- .delete ⇒ Object
- .import ⇒ Object
- .list ⇒ Object
- .show ⇒ Object
- .stats ⇒ Object
- .use ⇒ Object
Class Method Details
.add ⇒ Object
23 24 25 |
# File 'lib/gas_stats.rb', line 23 def self.add update_key 'add' end |
.delete ⇒ Object
27 28 29 |
# File 'lib/gas_stats.rb', line 27 def self.delete update_key 'delete' end |
.import ⇒ Object
31 32 33 |
# File 'lib/gas_stats.rb', line 31 def self.import update_key 'import' end |
.list ⇒ Object
35 36 37 |
# File 'lib/gas_stats.rb', line 35 def self.list update_key 'list' end |
.show ⇒ Object
39 40 41 |
# File 'lib/gas_stats.rb', line 39 def self.show update_key 'show' end |
.stats ⇒ Object
12 13 14 15 16 17 18 19 20 21 |
# File 'lib/gas_stats.rb', line 12 def self.stats if @config puts 'Gas statistics:' [:add, :delete, :import, :list, :show, :use].each do |key| puts " #{key.to_s}: #{(@config[key.to_s] ? @config[key.to_s] : 0)}" end else puts 'No statistics yet' end end |
.use ⇒ Object
43 44 45 |
# File 'lib/gas_stats.rb', line 43 def self.use update_key 'use' end |