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.



127
128
129
130
# File 'lib/logtrend.rb', line 127

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

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



125
126
127
# File 'lib/logtrend.rb', line 125

def name
  @name
end

#pointsObject (readonly)

Returns the value of attribute points.



124
125
126
# File 'lib/logtrend.rb', line 124

def points
  @points
end

Instance Method Details

#add_point(style, name, color) ⇒ Object



132
133
134
# File 'lib/logtrend.rb', line 132

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