Sha256: ff090b6c1bb465cc5b3261baafa01de2ba7eee7ceb21131fe8348bd194aff371

Contents?: true

Size: 379 Bytes

Versions: 4

Compression:

Stored size: 379 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?
        context = eval('self', block.binding) # rubocop:disable Style/EvalWithLocation
        @items << context.capture(&block)
      else
        @items << content
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ui_bibz-3.0.0.alpha6 lib/ui_bibz/ui/concerns/html_concern.rb
ui_bibz-3.0.0.alpha5 lib/ui_bibz/ui/concerns/html_concern.rb
ui_bibz-3.0.0.alpha3 lib/ui_bibz/ui/concerns/html_concern.rb
ui_bibz-3.0.0.alpha2 lib/ui_bibz/ui/concerns/html_concern.rb