Class: LogTrend::Graph
- Inherits:
-
Object
- Object
- LogTrend::Graph
- Defined in:
- lib/logtrend.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#points ⇒ Object
readonly
Returns the value of attribute points.
Instance Method Summary collapse
- #add_point(style, name, color) ⇒ Object
-
#initialize(name) ⇒ Graph
constructor
A new instance of Graph.
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
#name ⇒ Object (readonly)
Returns the value of attribute name.
168 169 170 |
# File 'lib/logtrend.rb', line 168 def name @name end |
#points ⇒ Object (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 |