Class: LesliView::Widgets::Chart
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- LesliView::Widgets::Chart
- Defined in:
- lib/lesli_view/widgets/chart.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(title = nil, data = nil, type: :bar) ⇒ Chart
constructor
A new instance of Chart.
Constructor Details
#initialize(title = nil, data = nil, type: :bar) ⇒ Chart
Returns a new instance of Chart.
38 39 40 41 42 |
# File 'lib/lesli_view/widgets/chart.rb', line 38 def initialize(title=nil, data=nil, type: :bar) @title = title @data = data @type = type end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
36 37 38 |
# File 'lib/lesli_view/widgets/chart.rb', line 36 def data @data end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
36 37 38 |
# File 'lib/lesli_view/widgets/chart.rb', line 36 def title @title end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
36 37 38 |
# File 'lib/lesli_view/widgets/chart.rb', line 36 def type @type end |