Class: LogTrend::Graph

Inherits:
Object
  • Object
show all
Defined in:
lib/logtrend.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ Graph

Returns a new instance of Graph.



170
171
172
173
# File 'lib/logtrend.rb', line 170

def initialize(name)
  @name = name
  @points = []
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



168
169
170
# File 'lib/logtrend.rb', line 168

def name
  @name
end

#pointsObject (readonly)

Returns the value of attribute points.



167
168
169
# File 'lib/logtrend.rb', line 167

def points
  @points
end

Instance Method Details

#add_point(style, name, color) ⇒ Object



175
176
177
# File 'lib/logtrend.rb', line 175

def add_point(style,name,color)
  @points << GraphPoint.new(style, name, color)
end