Class: NumberFlow::Component

Inherits:
ViewComponent::Base
  • Object
show all
Includes:
Helper
Defined in:
app/components/number_flow/component.rb

Constant Summary

Constants included from Helper

Helper::DEFAULT_DURATION, Helper::DEFAULT_EASING, Helper::DEFAULT_STAGGER

Instance Method Summary collapse

Methods included from Helper

#number_flow_tag

Constructor Details

#initialize(value:, **options) ⇒ Component

Returns a new instance of Component.



19
20
21
22
23
# File 'app/components/number_flow/component.rb', line 19

def initialize(value:, **options)
  @value = value
  @options = options
  super()
end

Instance Method Details

#callObject



25
26
27
# File 'app/components/number_flow/component.rb', line 25

def call
  number_flow_tag(@value, **@options)
end