Module: Line::Message::Builder::Flex

Defined in:
lib/line/message/builder/flex.rb,
lib/line/message/builder/flex/box.rb,
lib/line/message/builder/flex/icon.rb,
lib/line/message/builder/flex/size.rb,
lib/line/message/builder/flex/span.rb,
lib/line/message/builder/flex/text.rb,
lib/line/message/builder/flex/image.rb,
lib/line/message/builder/flex/bubble.rb,
lib/line/message/builder/flex/button.rb,
lib/line/message/builder/flex/builder.rb,
lib/line/message/builder/flex/partial.rb,
lib/line/message/builder/flex/carousel.rb,
lib/line/message/builder/flex/position.rb,
lib/line/message/builder/flex/separator.rb,
lib/line/message/builder/flex/actionable.rb

Overview

The Line::Message::Builder::Flex module serves as the primary namespace for all classes, modules, and components related to the construction of LINE Flex Messages within the line-message-builder gem.

Flex Messages are highly customizable messages that can display rich content with various layouts, components, and interactive elements. This module organizes the DSL for building these messages.

This file is responsible for loading all necessary sub-components and builder logic for Flex Messages, such as:

  • Flex::Builder - The main class used to construct a complete Flex Message object
  • Container components: Flex::Bubble, Flex::Carousel
  • Basic components: Flex::Box, Flex::Text, Flex::Button, Flex::Image
  • Mixin modules for shared functionality: Flex::Actionable, modules within Flex::Position and Flex::Size
  • The partial system: Flex::HasPartial and Flex::Partial

While this module itself is a namespace, the actual process of building a Flex Message typically starts within a Line::Message::Builder::Container block, by calling the flex method on the container. This method then instantiates and uses Flex::Builder to define the Flex Message structure.

Example

Line::Message::Builder.with do
# This +flex+ call on root_container would utilize Flex::Builder
flex alt_text: "My Flex Message"  do
  bubble do
    # ... define bubble content ...
  end
end
end

See also:

Defined Under Namespace

Modules: Actionable, HasPartial, Position, Size Classes: Box, Bubble, Builder, Button, Carousel, Icon, Image, Partial, Separator, Span, Text