Sha256: a9f68eaf543f987703ff10470ee33ed736cb301f392c25d59a2212e3341bb060

Contents?: true

Size: 641 Bytes

Versions: 24

Compression:

Stored size: 641 Bytes

Contents

# frozen_string_literal: true

module Maglev
  module Content
    class Icon < Base
      def_delegators :icon_class, :blank?

      def icon_class
        @content
      end

      def to_s
        @content
      end

      def tag(view_context, options = {})
        view_context.content_tag(:i, '',
                                 {
                                   class: [options.delete(:class), icon_class].compact.join(' '),
                                   data: (options.delete(:data) || {}).merge(tag_data)
                                 }.merge(options),
                                 false)
      end
    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
maglevcms-1.7.3 app/components/maglev/content/icon.rb
maglevcms-1.7.2 app/components/maglev/content/icon.rb
maglevcms-1.7.1 app/components/maglev/content/icon.rb
maglevcms-1.7.0 app/components/maglev/content/icon.rb
maglevcms-1.6.1 app/components/maglev/content/icon.rb
maglevcms-1.6.0 app/components/maglev/content/icon.rb
maglevcms-1.5.1 app/components/maglev/content/icon.rb
maglevcms-1.4.0 app/components/maglev/content/icon.rb
maglevcms-1.3.0 app/components/maglev/content/icon.rb
maglevcms-1.2.2 app/components/maglev/content/icon.rb
maglevcms-1.2.1 app/components/maglev/content/icon.rb
maglevcms-1.2.0 app/components/maglev/content/icon.rb
maglevcms-1.1.7 app/components/maglev/content/icon.rb
maglevcms-1.1.6 app/components/maglev/content/icon.rb
maglevcms-1.1.5 app/components/maglev/content/icon.rb
maglevcms-1.1.4 app/components/maglev/content/icon.rb
maglevcms-1.1.3 app/components/maglev/content/icon.rb
maglevcms-1.1.2 app/components/maglev/content/icon.rb
maglevcms-1.1.1 app/components/maglev/content/icon.rb
maglevcms-1.1.0 app/components/maglev/content/icon.rb