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.
127 128 129 130 |
# File 'lib/logtrend.rb', line 127 def initialize(name) @name = name @points = [] end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
125 126 127 |
# File 'lib/logtrend.rb', line 125 def name @name end |
#points ⇒ Object (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 |