Class: MetricDb::Server
- Inherits:
-
Object
show all
- Defined in:
- lib/MetricDb/Server.rb
Instance Method Summary
collapse
Constructor Details
#initialize ⇒ Server
Returns a new instance of Server.
7
8
9
|
# File 'lib/MetricDb/Server.rb', line 7
def initialize
@h = Hash.new
end
|
Instance Method Details
#[](*args) ⇒ Object
15
16
17
18
19
20
21
22
|
# File 'lib/MetricDb/Server.rb', line 15
def [](*args)
l = Array.new
args.each do |name|
@h[name] = self.getNewMetric( name ) if @h[name].nil?
l << @h[name]
end
return MetricBag.new(l)
end
|
#getNewMetric(name) ⇒ Object
11
12
13
|
# File 'lib/MetricDb/Server.rb', line 11
def getNewMetric( name )
raise "Method, getNewMetric, needs to be implemented"
end
|