Module: GraphiteDashboardApi::ExtraOptions
- Included in:
- Graph
- Defined in:
- lib/graphite-dashboard-api/extra_options.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(m, *args) ⇒ Object
4
5
6
7
8
9
|
# File 'lib/graphite-dashboard-api/extra_options.rb', line 4
def method_missing(m, *args)
if args && args.size > 0
@extra_options[m.to_s] = args[0]
end
@extra_options[m.to_s]
end
|
Instance Attribute Details
Returns the value of attribute extra_options.
3
4
5
|
# File 'lib/graphite-dashboard-api/extra_options.rb', line 3
def
@extra_options
end
|
Instance Method Details
19
20
21
22
23
24
25
|
# File 'lib/graphite-dashboard-api/extra_options.rb', line 19
def (std_options, hash)
= hash.keys - std_options
.each do |k|
@extra_options[k] = hash[k]
end
self
end
|
11
12
13
14
15
16
17
|
# File 'lib/graphite-dashboard-api/extra_options.rb', line 11
def
hash = {}
@extra_options.each do |k,v|
hash[k.to_s] = v
end
hash
end
|