Sha256: 85d1a33ea4818f61230f0f4d5036192a9a6baecc1d40bca59d4fd3bece5a6735

Contents?: true

Size: 378 Bytes

Versions: 4

Compression:

Stored size: 378 Bytes

Contents

# frozen_string_literal: true

module UiBibz::Ui::Concerns::HtmlConcern #:nodoc:
  extend ActiveSupport::Concern

  included do
    def html(content = nil, &block)
      if block.nil?
        @items << content
      else
        context = eval('self', block.binding) # rubocop:disable Style/EvalWithLocation
        @items << context.capture(&block)
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ui_bibz-3.0.0.alpha11 lib/ui_bibz/ui/concerns/html_concern.rb
ui_bibz-3.0.0.alpha10 lib/ui_bibz/ui/concerns/html_concern.rb
ui_bibz-3.0.0.alpha9 lib/ui_bibz/ui/concerns/html_concern.rb
ui_bibz-3.0.0.alpha8 lib/ui_bibz/ui/concerns/html_concern.rb