Sha256: c529163db17a2364c71503054a827210fa1a53e67534459865d7e4ebc043e820

Contents?: true

Size: 495 Bytes

Versions: 82

Compression:

Stored size: 495 Bytes

Contents

# frozen_string_literal: true

module Playbook
  module PbMessage
    class Message < Playbook::KitBase
      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
        valid? ? "avatar" : nil
      end
    end
  end
end

Version data entries

82 entries across 82 versions & 1 rubygems

Version Path
playbook_ui-9.18.0 app/pb_kits/playbook/pb_message/message.rb
playbook_ui-9.17.0 app/pb_kits/playbook/pb_message/message.rb
playbook_ui-9.17.0.pre.decouple.website2 app/pb_kits/playbook/pb_message/message.rb
playbook_ui-9.16.0 app/pb_kits/playbook/pb_message/message.rb
playbook_ui-9.15.0 app/pb_kits/playbook/pb_message/message.rb
playbook_ui-9.15.0.pre.decouple.website1 app/pb_kits/playbook/pb_message/message.rb
playbook_ui-9.14.1.alpha.radio.alignment app/pb_kits/playbook/pb_message/message.rb
playbook_ui-9.14.1.alpha.highcharts9 app/pb_kits/playbook/pb_message/message.rb
playbook_ui-9.14.1 app/pb_kits/playbook/pb_message/message.rb
playbook_ui-9.13.0 app/pb_kits/playbook/pb_message/message.rb
playbook_ui-9.12.0 app/pb_kits/playbook/pb_message/message.rb
playbook_ui-9.12.0.pre.text.addon app/pb_kits/playbook/pb_message/message.rb
playbook_ui-9.11.0 app/pb_kits/playbook/pb_message/message.rb
playbook_ui-9.10.0 app/pb_kits/playbook/pb_message/message.rb
playbook_ui-9.10.0.pre.date.time.stacked.1 app/pb_kits/playbook/pb_message/message.rb
playbook_ui-9.10.0.pre.alpha2 app/pb_kits/playbook/pb_message/message.rb
playbook_ui-9.10.0.pre.alpha1 app/pb_kits/playbook/pb_message/message.rb
playbook_ui-9.9.0.alpha.inline1 app/pb_kits/playbook/pb_message/message.rb
playbook_ui-9.9.0 app/pb_kits/playbook/pb_message/message.rb
playbook_ui-9.8.0 app/pb_kits/playbook/pb_message/message.rb