Sha256: 744c591536123e18357f2df73c7ab3d0d6bba335fc8c14b42ba7748290fe572d

Contents?: true

Size: 386 Bytes

Versions: 62

Compression:

Stored size: 386 Bytes

Contents

# frozen_string_literal: true

module ViewComponent
  module WithContentHelper
    def with_content(value)
      if value.nil?
        raise ArgumentError.new(
          "No content provided to `#with_content` for #{self}.\n\n" \
          "To fix this issue, pass a value."
        )
      else
        @__vc_content_set_by_with_content = value
      end

      self
    end
  end
end

Version data entries

62 entries across 62 versions & 2 rubygems

Version Path
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/view_component-2.83.0/lib/view_component/with_content_helper.rb
view_component-2.83.0 lib/view_component/with_content_helper.rb
view_component-3.0.0.rc5 lib/view_component/with_content_helper.rb
view_component-3.0.0.rc4 lib/view_component/with_content_helper.rb
view_component-3.0.0.rc3 lib/view_component/with_content_helper.rb
view_component-3.0.0.rc2 lib/view_component/with_content_helper.rb
view_component-3.0.0.rc1 lib/view_component/with_content_helper.rb
view_component-2.82.0 lib/view_component/with_content_helper.rb
view_component-2.81.0 lib/view_component/with_content_helper.rb
view_component-2.80.0 lib/view_component/with_content_helper.rb
view_component-2.79.0 lib/view_component/with_content_helper.rb
view_component-2.78.0 lib/view_component/with_content_helper.rb
view_component-2.77.0 lib/view_component/with_content_helper.rb
view_component-2.76.0 lib/view_component/with_content_helper.rb
view_component-2.75.0 lib/view_component/with_content_helper.rb
view_component-2.74.1 lib/view_component/with_content_helper.rb
view_component-2.74.0 lib/view_component/with_content_helper.rb
view_component-2.73.0 lib/view_component/with_content_helper.rb
view_component-2.72.0 lib/view_component/with_content_helper.rb
view_component-2.71.0 lib/view_component/with_content_helper.rb