Sha256: 2fcc5347511bfc9339497aa38ad5790a418283b968e3a35e64d8ef4b50979a09

Contents?: true

Size: 483 Bytes

Versions: 14

Compression:

Stored size: 483 Bytes

Contents

# frozen_string_literal: true

module Phlex
  module Icons
    module Tabler
      class Base < Icons::Base
        attr_reader :variant

        def initialize(variant: Phlex::Icons::Tabler.configuration.default_variant, **attrs)
          @variant = variant

          if attrs
            super(**attrs)
          else
            super()
          end
        end

        def view_template
          send(variant) if respond_to?(variant)
        end
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 2 rubygems

Version Path
phlex-icons-tabler-1.6.0 lib/phlex/icons/tabler/base.rb
phlex-icons-1.6.0 lib/phlex/icons/tabler/base.rb
phlex-icons-tabler-1.5.0 lib/phlex/icons/tabler/base.rb
phlex-icons-1.5.0 lib/phlex/icons/tabler/base.rb
phlex-icons-tabler-1.4.0 lib/phlex/icons/tabler/base.rb
phlex-icons-1.4.0 lib/phlex/icons/tabler/base.rb
phlex-icons-1.3.0 lib/phlex/icons/tabler/base.rb
phlex-icons-tabler-1.3.0 lib/phlex/icons/tabler/base.rb
phlex-icons-tabler-1.2.0 lib/phlex/icons/tabler/base.rb
phlex-icons-1.2.0 lib/phlex/icons/tabler/base.rb
phlex-icons-tabler-1.1.0 lib/phlex/icons/tabler/base.rb
phlex-icons-1.1.0 lib/phlex/icons/tabler/base.rb
phlex-icons-1.0.0 lib/phlex/icons/tabler/base.rb
phlex-icons-tabler-1.0.0 lib/phlex/icons/tabler/base.rb