Class: Alchemy::Ingredients::NumberView
- Defined in:
- app/components/alchemy/ingredients/number_view.rb
Instance Attribute Summary
Attributes inherited from BaseView
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(ingredient, options = {}) ⇒ NumberView
constructor
A new instance of NumberView.
Methods inherited from BaseView
Constructor Details
#initialize(ingredient, options = {}) ⇒ NumberView
Returns a new instance of NumberView.
4 5 6 7 8 9 10 11 |
# File 'app/components/alchemy/ingredients/number_view.rb', line 4 def initialize(ingredient, = {}) super(ingredient) @options = { units: { unit: settings_value(:unit, value: [:unit]) }.merge([:units] || {}) } end |
Instance Method Details
#call ⇒ Object
13 14 15 |
# File 'app/components/alchemy/ingredients/number_view.rb', line 13 def call number_to_human(value, @options) end |