Module: Line::Message::Builder::Flex::Position::Padding
- Included in:
- Box
- Defined in:
- lib/line/message/builder/flex/position.rb
Overview
Provides padding options for components, allowing space to be defined around the content of a component, inside its borders.
Note: In this DSL, padding is an alias for padding_all.
The LINE API uses paddingAll. When using the DSL padding(value),
it sets the underlying value that will be output as paddingAll.
Class Method Summary collapse
-
.included(base) ⇒ Object
:nodoc:.
Class Method Details
.included(base) ⇒ Object
:nodoc:
156 157 158 159 160 161 162 163 |
# File 'lib/line/message/builder/flex/position.rb', line 156 def self.included(base) # Individual side paddings %i[padding padding_all padding_top padding_bottom padding_start padding_end].each do |option_name| base.option option_name, # e.g., maps to `paddingTop` in JSON default: nil, validator: Validators::Size.new(:pixel, :keyword, :percentage) end end |