Method: Alchemy::Ingredients::TextView#initialize

Defined in:
app/components/alchemy/ingredients/text_view.rb

#initialize(ingredient, disable_link: nil, html_options: {}) ⇒ TextView

Returns a new instance of TextView.

Parameters:

  • ingredient (Alchemy::Ingredient)
  • disable_link (Boolean) (defaults to: nil)

    (false) Whether to disable the link even if the picture has a link.

  • html_options (Hash) (defaults to: {})

    Options that will be passed to the a tag.



14
15
16
17
# File 'app/components/alchemy/ingredients/text_view.rb', line 14

def initialize(ingredient, disable_link: nil, html_options: {})
  super(ingredient, html_options: html_options)
  @disable_link = settings_value(:disable_link, value: disable_link, default: false)
end