Module: Plushie::Type::Alignment
- Defined in:
- lib/plushie/type/alignment.rb
Overview
Alignment values for align_x and align_y widget props.
Horizontal: :left, :center, :right. Vertical: :top, :center, :bottom.
Constant Summary collapse
- VALID =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
Valid alignment values.
%i[left center right top bottom].freeze
Class Method Summary collapse
-
.encode(value) ⇒ String
Encode an alignment value to the wire format.
Class Method Details
.encode(value) ⇒ String
Encode an alignment value to the wire format.
23 24 25 26 |
# File 'lib/plushie/type/alignment.rb', line 23 def self.encode(value) raise ArgumentError, "invalid alignment: #{value.inspect}" unless VALID.include?(value) value.to_s end |