Class: PandaCms::Admin::StatisticsComponent
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- PandaCms::Admin::StatisticsComponent
- Defined in:
- app/components/panda_cms/admin/statistics_component.rb
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:) ⇒ StatisticsComponent
constructor
A new instance of StatisticsComponent.
Constructor Details
#initialize(metric:, value:) ⇒ StatisticsComponent
Returns a new instance of StatisticsComponent.
9 10 11 12 |
# File 'app/components/panda_cms/admin/statistics_component.rb', line 9 def initialize(metric:, value:) @metric = metric @value = value end |
Instance Attribute Details
#metric ⇒ Object (readonly)
Returns the value of attribute metric.
6 7 8 |
# File 'app/components/panda_cms/admin/statistics_component.rb', line 6 def metric @metric end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
7 8 9 |
# File 'app/components/panda_cms/admin/statistics_component.rb', line 7 def value @value end |