Class: CollectdPlot::PlotProperties
- Inherits:
-
Object
- Object
- CollectdPlot::PlotProperties
- Defined in:
- lib/collectd-plot/plot_properties.rb
Instance Attribute Summary collapse
-
#finish ⇒ Object
Returns the value of attribute finish.
-
#host ⇒ Object
may be a glob.
-
#instance ⇒ Object
Returns the value of attribute instance.
-
#metric ⇒ Object
Returns the value of attribute metric.
-
#start ⇒ Object
Returns the value of attribute start.
Instance Method Summary collapse
-
#initialize(params = {}) ⇒ PlotProperties
constructor
A new instance of PlotProperties.
Constructor Details
#initialize(params = {}) ⇒ PlotProperties
Returns a new instance of PlotProperties.
11 12 13 14 15 16 17 18 |
# File 'lib/collectd-plot/plot_properties.rb', line 11 def initialize(params = {}) self.host = params[:host] or raise ("no host") self.metric = params[:metric] or raise ("no metric") self.instance = params[:instance] self.start = params[:start] || (Time.now.to_i - 86400) self.finish = params[:finish] || Time.now.to_i self.instance = params[:instance] || "TODO" end |
Instance Attribute Details
#finish ⇒ Object
Returns the value of attribute finish.
8 9 10 |
# File 'lib/collectd-plot/plot_properties.rb', line 8 def finish @finish end |
#host ⇒ Object
may be a glob
5 6 7 |
# File 'lib/collectd-plot/plot_properties.rb', line 5 def host @host end |
#instance ⇒ Object
Returns the value of attribute instance.
9 10 11 |
# File 'lib/collectd-plot/plot_properties.rb', line 9 def instance @instance end |
#metric ⇒ Object
Returns the value of attribute metric.
6 7 8 |
# File 'lib/collectd-plot/plot_properties.rb', line 6 def metric @metric end |
#start ⇒ Object
Returns the value of attribute start.
7 8 9 |
# File 'lib/collectd-plot/plot_properties.rb', line 7 def start @start end |