Class: Panda::Core::Admin::StatisticsComponent

Inherits:
Base
  • Object
show all
Defined in:
app/components/panda/core/admin/statistics_component.rb

Constant Summary

Constants inherited from Base

Base::TAILWIND_MERGER

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#metricObject (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

#valueObject (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