Sha256: afef8bc516047e8d909c66f84c3a4d24ecca3a82e1249c6d9cfba96c0c17aed5

Contents?: true

Size: 695 Bytes

Versions: 16

Compression:

Stored size: 695 Bytes

Contents

module Vedeu

  module Geometries

    # Provides the mechanism to align an interface/view horizontally
    # within the available terminal space.
    #
    # @api private
    #
    class HorizontalAlignment < 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 horizontal alignment value given. Valid values are :center, ' \
             ':centre, :left, :none, :right.'.freeze
      end

    end # HorizontalAlignment

  end # Geometries

end # Vedeu

Version data entries

16 entries across 16 versions & 1 rubygems

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