Class: Panda::Core::Admin::StatisticsComponent
- Defined in:
- app/components/panda/core/admin/statistics_component.rb
Constant Summary
Constants inherited from Base
Instance Attribute Summary collapse
-
#metric ⇒ Object
readonly
Returns the value of attribute metric.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(metric: "", value: nil, **attrs) ⇒ StatisticsComponent
constructor
A new instance of StatisticsComponent.
Constructor Details
#initialize(metric: "", value: nil, **attrs) ⇒ StatisticsComponent
Returns a new instance of StatisticsComponent.
7 8 9 10 11 |
# File 'app/components/panda/core/admin/statistics_component.rb', line 7 def initialize(metric: "", value: nil, **attrs) @metric = metric @value = value super(**attrs) end |
Instance Attribute Details
#metric ⇒ Object (readonly)
Returns the value of attribute metric.
13 14 15 |
# File 'app/components/panda/core/admin/statistics_component.rb', line 13 def metric @metric end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
13 14 15 |
# File 'app/components/panda/core/admin/statistics_component.rb', line 13 def value @value end |