Sha256: c67e971d91773075cf4176afeba114eefab6cc66b1a12171241f93745dd06f42

Contents?: true

Size: 640 Bytes

Versions: 2

Compression:

Stored size: 640 Bytes

Contents

# frozen_string_literal: true

module Satis
  module Tab
    class Component < Satis::ApplicationComponent
      attr_reader :options, :name, :icon, :badge

      def initialize(name, *args, &block)
        super
        @name = name
        @options = args.extract_options!
        @args = args
        @icon = options[:icon]
        @badge = options[:badge]
        @block = block
      end

      def responsive?
        options[:responsive] == true
      end

      def selected?
        options[:selected] == true
      end

      def title
        options[:title]
      end

      def call
        content
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
satis-1.0.67 app/components/satis/tab/component.rb
satis-1.0.66 app/components/satis/tab/component.rb