Sha256: 9101402ea8af6b04f0b7add60d63ae7cc61d09c429679f6a393fcd02ce976da4

Contents?: true

Size: 547 Bytes

Versions: 45

Compression:

Stored size: 547 Bytes

Contents

# frozen_string_literal: true

module Playbook
  module PbMessage
    class Message
      include Playbook::Props

      partial "pb_message/message"

      prop :avatar_name
      prop :avatar_status
      prop :avatar_url
      prop :label
      prop :message
      prop :timestamp

      def classname
        generate_classname("pb_message_kit", avatar_class)
      end

      def valid?
        avatar_url.present? || avatar_name
      end

    private

      def avatar_class
        avatar_name ? "avatar" : nil
      end
    end
  end
end

Version data entries

45 entries across 45 versions & 1 rubygems

Version Path
playbook_ui-4.17.0 app/pb_kits/playbook/pb_message/message.rb
playbook_ui-4.17.0.pre.alpha1 app/pb_kits/playbook/pb_message/message.rb
playbook_ui-4.16.0 app/pb_kits/playbook/pb_message/message.rb
playbook_ui-4.15.0 app/pb_kits/playbook/pb_message/message.rb
playbook_ui-4.14.0 app/pb_kits/playbook/pb_message/message.rb
playbook_ui-4.15.1.alpha1 app/pb_kits/playbook/pb_message/message.rb
playbook_ui-4.13.1 app/pb_kits/playbook/pb_message/message.rb
playbook_ui-4.13.0 app/pb_kits/playbook/pb_message/message.rb
playbook_ui-4.12.0 app/pb_kits/playbook/pb_message/message.rb
playbook_ui-4.11.0 app/pb_kits/playbook/pb_message/message.rb
playbook_ui-4.11.0.pre.alpha3 app/pb_kits/playbook/pb_message/message.rb
playbook_ui-4.11.0.pre.alpha.pre.2 app/pb_kits/playbook/pb_message/message.rb
playbook_ui-4.10.0 app/pb_kits/playbook/pb_message/message.rb
playbook_ui-4.10.0.pre.alpha1 app/pb_kits/playbook/pb_message/message.rb
playbook_ui-4.9.0.pre.alpha1 app/pb_kits/playbook/pb_message/message.rb
playbook_ui-4.9.0 app/pb_kits/playbook/pb_message/message.rb
playbook_ui-4.8.2 app/pb_kits/playbook/pb_message/message.rb
playbook_ui-4.8.1 app/pb_kits/playbook/pb_message/message.rb
playbook_ui-4.7.1 app/pb_kits/playbook/pb_message/message.rb
playbook_ui-4.7.0 app/pb_kits/playbook/pb_message/message.rb