Class: Protos::ChatBubble

Inherits:
Component
  • Object
show all
Defined in:
lib/protos/chat_bubble.rb,
lib/protos/chat_bubble/image.rb,
lib/protos/chat_bubble/footer.rb,
lib/protos/chat_bubble/header.rb,
lib/protos/chat_bubble/content.rb

Defined Under Namespace

Classes: Content, Footer, Header, Image

Constant Summary collapse

ALIGNMENTS =
{
  start: "chat-start",
  end: "chat-end"
}.freeze

Instance Method Summary collapse

Methods inherited from Component

#initialize

Constructor Details

This class inherits a constructor from Protos::Component

Instance Method Details

#contentObject



32
# File 'lib/protos/chat_bubble.rb', line 32

def content(...) = render Content.new(...)


34
# File 'lib/protos/chat_bubble.rb', line 34

def footer(...) = render Footer.new(...)

#headerObject



36
# File 'lib/protos/chat_bubble.rb', line 36

def header(...) = render Header.new(...)

#imageObject



38
# File 'lib/protos/chat_bubble.rb', line 38

def image(...) = render Image.new(...)

#view_templateObject



28
29
30
# File 'lib/protos/chat_bubble.rb', line 28

def view_template(&)
  div(**attrs, &)
end