Sha256: 674d2718774a871c4993797261bc24f693bec33957cb19e823247a2a3d09bc3e

Contents?: true

Size: 545 Bytes

Versions: 10

Compression:

Stored size: 545 Bytes

Contents

module WhirledPeas
  module Settings
    module Alignment
      LEFT = :left
      CENTER = :center
      RIGHT = :right
      BETWEEN = :between
      AROUND = :around
      EVENLY = :evenly

      DEFAULT = LEFT

      VALID = [LEFT, CENTER, RIGHT, BETWEEN, AROUND, EVENLY]
      private_constant :VALID

      def self.validate!(align)
        return if align.nil?
        return align if VALID.include?(align)
        raise ArgumentError, "Unsupported alignment: #{align.inspect}"
      end
    end
    private_constant :Alignment
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
whirled_peas-0.13.0 lib/whirled_peas/settings/alignment.rb
whirled_peas-0.12.0 lib/whirled_peas/settings/alignment.rb
whirled_peas-0.11.1 lib/whirled_peas/settings/alignment.rb
whirled_peas-0.11.0 lib/whirled_peas/settings/alignment.rb
whirled_peas-0.10.0 lib/whirled_peas/settings/alignment.rb
whirled_peas-0.9.1 lib/whirled_peas/settings/alignment.rb
whirled_peas-0.9.0 lib/whirled_peas/settings/alignment.rb
whirled_peas-0.8.0 lib/whirled_peas/settings/alignment.rb
whirled_peas-0.7.1 lib/whirled_peas/settings/alignment.rb
whirled_peas-0.7.0 lib/whirled_peas/settings/alignment.rb