Sha256: 340a71bb5e7a99b2b2a883c77841abbf486bbe6074dda7fe63a72233c7a9bd84

Contents?: true

Size: 495 Bytes

Versions: 23

Compression:

Stored size: 495 Bytes

Contents

# frozen_string_literal: true

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

        def initialize(variant: Phlex::Icons::Hero.configuration.default_variant, classes: nil)
          @variant = variant

          if classes
            super(classes: classes)
          else
            super()
          end
        end

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

Version data entries

23 entries across 23 versions & 2 rubygems

Version Path
phlex-icons-0.17.0 lib/phlex/icons/hero/base.rb
phlex-icons-hero-0.17.0 lib/phlex/icons/hero/base.rb
phlex-icons-0.16.0 lib/phlex/icons/hero/base.rb
phlex-icons-hero-0.16.0 lib/phlex/icons/hero/base.rb
phlex-icons-0.15.0 lib/phlex/icons/hero/base.rb
phlex-icons-0.14.0 lib/phlex/icons/hero/base.rb
phlex-icons-hero-0.13.0 lib/phlex/icons/hero/base.rb
phlex-icons-0.13.0 lib/phlex/icons/hero/base.rb
phlex-icons-0.12.0 lib/phlex/icons/hero/base.rb
phlex-icons-hero-0.12.0 lib/phlex/icons/hero/base.rb
phlex-icons-0.11.0 lib/phlex/icons/hero/base.rb
phlex-icons-hero-0.11.0 lib/phlex/icons/hero/base.rb
phlex-icons-0.10.0 lib/phlex/icons/hero/base.rb
phlex-icons-0.9.0 lib/phlex/icons/hero/base.rb
phlex-icons-hero-0.9.0 lib/phlex/icons/hero/base.rb
phlex-icons-0.8.0 lib/phlex/icons/hero/base.rb
phlex-icons-0.7.0 lib/phlex/icons/hero/base.rb
phlex-icons-0.6.0 lib/phlex/icons/hero/base.rb
phlex-icons-0.5.0 lib/phlex/icons/hero/base.rb
phlex-icons-0.4.0 lib/phlex/icons/hero/base.rb