Module: Line::Message::Builder::Flex::Size::AdjustMode
Overview
Provides the adjust_mode option, primarily for Button components,
to control how they fit within available space. Currently, only
:"shrink-to-fit" is supported by LINE API via this property.
Class Method Summary collapse
-
.included(base) ⇒ Object
:nodoc:.
Instance Method Summary collapse
-
#shrink_to_fit! ⇒ Object
A convenience DSL method to set the
adjust_modeto:"shrink-to-fit".
Class Method Details
.included(base) ⇒ Object
:nodoc:
109 110 111 112 113 114 115 |
# File 'lib/line/message/builder/flex/size.rb', line 109 def self.included(base) base.option :adjust_mode, default: nil, validator: Validators::Enum.new( :"shrink-to-fit" # LINE API uses "shrink-to-fit" ) end |
Instance Method Details
#shrink_to_fit! ⇒ Object
A convenience DSL method to set the adjust_mode to :"shrink-to-fit".
Example
.shrink_to_fit!
122 123 124 |
# File 'lib/line/message/builder/flex/size.rb', line 122 def shrink_to_fit! adjust_mode(:"shrink-to-fit") end |