Class: Railswatch::Widgets::Chart
- Defined in:
- lib/railswatch/widgets/chart.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#description ⇒ Object
Returns the value of attribute description.
-
#legend ⇒ Object
Returns the value of attribute legend.
-
#subtitle ⇒ Object
Returns the value of attribute subtitle.
-
#units ⇒ Object
Returns the value of attribute units.
Attributes inherited from Base
Instance Method Summary collapse
- #data ⇒ Object
- #id ⇒ Object
-
#initialize(datasource, subtitle: nil, description: nil, legend: nil, units: nil) ⇒ Chart
constructor
A new instance of Chart.
- #to_partial_path ⇒ Object
- #type ⇒ Object
Constructor Details
#initialize(datasource, subtitle: nil, description: nil, legend: nil, units: nil) ⇒ Chart
Returns a new instance of Chart.
8 9 10 11 12 13 14 |
# File 'lib/railswatch/widgets/chart.rb', line 8 def initialize(datasource, subtitle: nil, description: nil, legend: nil, units: nil) super(datasource) @subtitle = subtitle @description = description @legend = legend @units = units end |
Instance Attribute Details
#description ⇒ Object
Returns the value of attribute description.
6 7 8 |
# File 'lib/railswatch/widgets/chart.rb', line 6 def description @description end |
#legend ⇒ Object
Returns the value of attribute legend.
6 7 8 |
# File 'lib/railswatch/widgets/chart.rb', line 6 def legend @legend end |
#subtitle ⇒ Object
Returns the value of attribute subtitle.
6 7 8 |
# File 'lib/railswatch/widgets/chart.rb', line 6 def subtitle @subtitle end |
#units ⇒ Object
Returns the value of attribute units.
6 7 8 |
# File 'lib/railswatch/widgets/chart.rb', line 6 def units @units end |
Instance Method Details
#data ⇒ Object
24 25 26 |
# File 'lib/railswatch/widgets/chart.rb', line 24 def data raise NotImplementedError end |
#id ⇒ Object
16 17 18 |
# File 'lib/railswatch/widgets/chart.rb', line 16 def id raise NotImplementedError end |
#to_partial_path ⇒ Object
28 29 30 |
# File 'lib/railswatch/widgets/chart.rb', line 28 def to_partial_path 'railswatch/railswatch/chart' end |
#type ⇒ Object
20 21 22 |
# File 'lib/railswatch/widgets/chart.rb', line 20 def type raise NotImplementedError end |