Sha256: 20f2ae7ef02ded926eaec3c56a2ba20678798bc4dfaa1857cade4e2a06ccbb20

Contents?: true

Size: 511 Bytes

Versions: 25

Compression:

Stored size: 511 Bytes

Contents

module Alchemy
  module Ingredients
    class HeadlineView < BaseView
      def initialize(ingredient, level: nil, html_options: {})
        super(ingredient, html_options: html_options)
        @level = level
      end

      def call
        content_tag "h#{@level || ingredient.level}",
          ingredient.value,
          id: ingredient.dom_id.presence,
          class: [
            ingredient.size ? "h#{ingredient.size}" : nil,
            html_options[:class]
          ]
      end
    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
alchemy_cms-7.0.11 app/components/alchemy/ingredients/headline_view.rb
alchemy_cms-7.1.6 app/components/alchemy/ingredients/headline_view.rb
alchemy_cms-7.1.5 app/components/alchemy/ingredients/headline_view.rb
alchemy_cms-7.0.10 app/components/alchemy/ingredients/headline_view.rb
alchemy_cms-7.1.4 app/components/alchemy/ingredients/headline_view.rb
alchemy_cms-7.0.9 app/components/alchemy/ingredients/headline_view.rb
alchemy_cms-7.1.3 app/components/alchemy/ingredients/headline_view.rb
alchemy_cms-7.1.2 app/components/alchemy/ingredients/headline_view.rb
alchemy_cms-7.1.1 app/components/alchemy/ingredients/headline_view.rb
alchemy_cms-7.1.0 app/components/alchemy/ingredients/headline_view.rb
alchemy_cms-7.1.0.pre.rc1 app/components/alchemy/ingredients/headline_view.rb
alchemy_cms-7.1.0.pre.b2 app/components/alchemy/ingredients/headline_view.rb
alchemy_cms-7.1.0.pre.b1 app/components/alchemy/ingredients/headline_view.rb
alchemy_cms-7.0.8 app/components/alchemy/ingredients/headline_view.rb
alchemy_cms-7.0.7 app/components/alchemy/ingredients/headline_view.rb
alchemy_cms-7.0.6 app/components/alchemy/ingredients/headline_view.rb
alchemy_cms-7.0.5 app/components/alchemy/ingredients/headline_view.rb
alchemy_cms-7.0.4 app/components/alchemy/ingredients/headline_view.rb
alchemy_cms-7.0.3 app/components/alchemy/ingredients/headline_view.rb
alchemy_cms-7.0.2 app/components/alchemy/ingredients/headline_view.rb