Class: Alchemy::Ingredients::BooleanView

Inherits:
BaseView
  • Object
show all
Defined in:
app/components/alchemy/ingredients/boolean_view.rb

Instance Attribute Summary

Attributes inherited from BaseView

#html_options, #ingredient

Instance Method Summary collapse

Methods inherited from BaseView

#initialize

Constructor Details

This class inherits a constructor from Alchemy::Ingredients::BaseView

Instance Method Details

#callObject



4
5
6
# File 'app/components/alchemy/ingredients/boolean_view.rb', line 4

def call
  Alchemy.t(value, scope: "ingredient_values.boolean")
end

#render?Boolean

Returns:



8
9
10
# File 'app/components/alchemy/ingredients/boolean_view.rb', line 8

def render?
  !value.nil?
end