Sha256: 65fccb0ebed706e625e28551097fd0099d9cfe949479c8277a8889dccffd4284

Contents?: true

Size: 586 Bytes

Versions: 88

Compression:

Stored size: 586 Bytes

Contents

# frozen_string_literal: true

module Playbook
  module PbMultipleUsers
    class MultipleUsers < Playbook::KitBase
      prop :reverse, type: Playbook::Props::Boolean, default: false
      prop :users, type: Playbook::Props::HashArray, required: true

      def more_than_four
        users.count > 4
      end

      def display_count
        more_than_four ? 3 : users.count
      end

      def classname
        generate_classname("pb_multiple_users_kit", reverse_class)
      end

    private

      def reverse_class
        reverse ? "reverse" : nil
      end
    end
  end
end

Version data entries

88 entries across 88 versions & 1 rubygems

Version Path
playbook_ui-9.3.1.pre.alpha1 app/pb_kits/playbook/pb_multiple_users/multiple_users.rb
playbook_ui-9.3.0.alpha.inline3 app/pb_kits/playbook/pb_multiple_users/multiple_users.rb
playbook_ui-9.3.0.pre.alpha.password.strength.2 app/pb_kits/playbook/pb_multiple_users/multiple_users.rb
playbook_ui-9.3.0.alpha.inline2 app/pb_kits/playbook/pb_multiple_users/multiple_users.rb
playbook_ui-9.3.0.alpha.inline1 app/pb_kits/playbook/pb_multiple_users/multiple_users.rb
playbook_ui-9.3.0.pre.alpha.password.strength.1 app/pb_kits/playbook/pb_multiple_users/multiple_users.rb
playbook_ui-9.3.0 app/pb_kits/playbook/pb_multiple_users/multiple_users.rb
playbook_ui-9.2.2.pre.alpha.margin app/pb_kits/playbook/pb_multiple_users/multiple_users.rb
playbook_ui-9.2.2 app/pb_kits/playbook/pb_multiple_users/multiple_users.rb
playbook_ui-9.2.1 app/pb_kits/playbook/pb_multiple_users/multiple_users.rb
playbook_ui-9.2.0 app/pb_kits/playbook/pb_multiple_users/multiple_users.rb
playbook_ui-9.1.0 app/pb_kits/playbook/pb_multiple_users/multiple_users.rb
playbook_ui-9.0.0 app/pb_kits/playbook/pb_multiple_users/multiple_users.rb
playbook_ui-8.3.0.alpha.select.pre.margin app/pb_kits/playbook/pb_multiple_users/multiple_users.rb
playbook_ui-8.3.0 app/pb_kits/playbook/pb_multiple_users/multiple_users.rb
playbook_ui-8.2.1.pre.alpha5 app/pb_kits/playbook/pb_multiple_users/multiple_users.rb
playbook_ui-8.2.1.pre.alpha4 app/pb_kits/playbook/pb_multiple_users/multiple_users.rb
playbook_ui-8.2.1.alpha.iconacc app/pb_kits/playbook/pb_multiple_users/multiple_users.rb
playbook_ui-8.2.1.pre.alpha3 app/pb_kits/playbook/pb_multiple_users/multiple_users.rb
playbook_ui-8.2.1.pre.alpha2 app/pb_kits/playbook/pb_multiple_users/multiple_users.rb