Sha256: d2809988bc89e8a632444bdcb3430eb947433282fa100210257d654514607ca9

Contents?: true

Size: 280 Bytes

Versions: 6

Compression:

Stored size: 280 Bytes

Contents

# frozen_string_literal: true

module ViewComponent
  module WithContentHelper
    def with_content(value)
      if value.nil?
        raise ArgumentError.new("No content provided.")
      else
        @_content_set_by_with_content = value
      end

      self
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
view_component-2.31.2 lib/view_component/with_content_helper.rb
view_component-2.34.0 lib/view_component/with_content_helper.rb
view_component-2.33.0 lib/view_component/with_content_helper.rb
view_component-2.32.0 lib/view_component/with_content_helper.rb
view_component-2.31.1 lib/view_component/with_content_helper.rb
view_component-2.31.0 lib/view_component/with_content_helper.rb