Sha256: ffdb6066cfd9653cc538496d076f9640facac4b368ece14ffcf824cb510838a7

Contents?: true

Size: 1.16 KB

Versions: 29

Compression:

Stored size: 1.16 KB

Contents

# frozen_string_literal: true

require_relative 'utilities/initializer'

module NfgUi
  module UI
    # The class that yields the component for the view
    class Bootstrap
      include NfgUi::UI::Utilities::Initializer

      attr_accessor :view_context
      # attr_reader :component_name_folder

      def initialize(view_context, component_name = nil, *traits, **options, &block)
        self.view_context = view_context
        initializer(component_name, *traits, **options, &block)
        # @component_name_folder = component.component_family.to_s.pluralize if component.component_family.present?
        # raise component.send(:component_family).inspect
      end

      private

      def component_name_folder
        # component.component_family.to_s.pluralize if component.component_family.present?
        component.component_family.to_s.pluralize
        # ''
      end

      def group
        'bootstrap'
      end

      def grouping_folder
        'bootstrap'
      end

      def ancestry_string
        "NfgUi::Bootstrap::Components::#{class_name}"
      end

      def components_within_group(*)
        NfgUi::BOOTSTRAP_COMPONENT_NAMES
      end
    end
  end
end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
nfg_ui-6.17.2 lib/nfg_ui/ui/bootstrap.rb
nfg_ui-6.17.1 lib/nfg_ui/ui/bootstrap.rb
nfg_ui-6.17.0 lib/nfg_ui/ui/bootstrap.rb
nfg_ui-6.16.3 lib/nfg_ui/ui/bootstrap.rb
nfg_ui-6.16.2 lib/nfg_ui/ui/bootstrap.rb
nfg_ui-6.16.1 lib/nfg_ui/ui/bootstrap.rb
nfg_ui-6.16.0 lib/nfg_ui/ui/bootstrap.rb
nfg_ui-5.15.7 lib/nfg_ui/ui/bootstrap.rb
nfg_ui-5.15.6 lib/nfg_ui/ui/bootstrap.rb
nfg_ui-5.15.5 lib/nfg_ui/ui/bootstrap.rb
nfg_ui-5.15.4 lib/nfg_ui/ui/bootstrap.rb
nfg_ui-5.15.3 lib/nfg_ui/ui/bootstrap.rb
nfg_ui-0.15.2 lib/nfg_ui/ui/bootstrap.rb
nfg_ui-0.15.1 lib/nfg_ui/ui/bootstrap.rb
nfg_ui-0.15.0 lib/nfg_ui/ui/bootstrap.rb
nfg_ui-0.14.7 lib/nfg_ui/ui/bootstrap.rb
nfg_ui-0.14.6.3 lib/nfg_ui/ui/bootstrap.rb
nfg_ui-0.14.6.2 lib/nfg_ui/ui/bootstrap.rb
nfg_ui-0.14.6.1 lib/nfg_ui/ui/bootstrap.rb
nfg_ui-0.14.6 lib/nfg_ui/ui/bootstrap.rb