Class: Panda::CMS::Admin::StatisticsComponent

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#metricObject (readonly)

Returns the value of attribute metric.



7
8
9
# File 'app/components/panda/cms/admin/statistics_component.rb', line 7

def metric
  @metric
end

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