Sha256: d6e32f9c6a4d25628faf56d6c49537ad5c919864e725b48eb10f8f8be8adb20a

Contents?: true

Size: 678 Bytes

Versions: 16

Compression:

Stored size: 678 Bytes

Contents

module Vedeu

  module Geometries

    # Provides the mechanism to align an interface/view vertically
    # within the available terminal space.
    #
    # @api private
    #
    class VerticalAlignment < Vedeu::Geometries::Alignment

      # @raise [Vedeu::Error::InvalidSyntax] When the value is not one
      #   of :bottom, :centre, :left, :middle, :right, :top.
      # @return [Symbol]
      def align
        return value if valid?

        fail Vedeu::Error::InvalidSyntax,
             'No vertical alignment value given. Valid values are :bottom, ' \
             ':middle, :none, :top.'.freeze
      end

    end # VerticalAlignment

  end # Geometries

end # Vedeu

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
vedeu-0.7.4 lib/vedeu/geometries/alignment/vertical_alignment.rb
vedeu-0.7.3 lib/vedeu/geometries/alignment/vertical_alignment.rb
vedeu-0.7.2 lib/vedeu/geometries/alignment/vertical_alignment.rb
vedeu-0.7.1 lib/vedeu/geometries/alignment/vertical_alignment.rb
vedeu-0.7.0 lib/vedeu/geometries/alignment/vertical_alignment.rb
vedeu-0.6.71 lib/vedeu/geometries/alignment/vertical_alignment.rb
vedeu-0.6.70 lib/vedeu/geometries/alignment/vertical_alignment.rb
vedeu-0.6.69 lib/vedeu/geometries/alignment/vertical_alignment.rb
vedeu-0.6.68 lib/vedeu/geometries/vertical_alignment.rb
vedeu-0.6.67 lib/vedeu/geometries/vertical_alignment.rb
vedeu-0.6.66 lib/vedeu/geometries/vertical_alignment.rb
vedeu-0.6.65 lib/vedeu/geometries/vertical_alignment.rb
vedeu-0.6.64 lib/vedeu/geometries/vertical_alignment.rb
vedeu-0.6.63 lib/vedeu/geometries/vertical_alignment.rb
vedeu-0.6.62 lib/vedeu/geometries/vertical_alignment.rb
vedeu-0.6.61 lib/vedeu/geometries/vertical_alignment.rb