module Line::Message::Builder::Flex
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 completeFlexMessageobject -
Containercomponents:Flex::Bubble,Flex::Carousel -
Basic components:
Flex::Box,Flex::Text,Flex::Button,Flex::Image -
Mixin modules for shared functionality:
Flex::Actionable, modules withinFlex::PositionandFlex::Size -
The partial system:
Flex::HasPartialandFlex::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:
-
Flex::Builder- For the mainFlexMessageconstruction entry point -
developers.line.biz/en/docs/messaging-api/using-flex-messages/