class UiHelpers::Flash

Attributes

icon[RW]

Public Instance Methods

html(tag_name) { |paragraph| ... } click to toggle source
# File lib/ui_helpers/elements/flash.rb, line 6
def html(tag_name, &block)
  tag(tag_name) do |buffer|
    buffer << Element.new(@template).tag(:p) do |paragraph|
      paragraph << Icon.new(@template, icon).tag(:span)
      yield paragraph if block_given?
    end
  end
end