Sha256: cbe29fae65c3f7af072c62a13ae46e482fc68f630494b3915b4a95af72d1c4cd

Contents?: true

Size: 689 Bytes

Versions: 9

Compression:

Stored size: 689 Bytes

Contents

module Vedeu

  module Geometry

    # Provides the mechanism to align an interface/view horizontally
    # within the available terminal space.
    #
    # @api private
    #
    class HorizontalAlignment < Vedeu::Geometry::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 # Geometry

end # Vedeu

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
vedeu-0.6.60 lib/vedeu/geometry/horizontal_alignment.rb
vedeu-0.6.59 lib/vedeu/geometry/horizontal_alignment.rb
vedeu-0.6.58 lib/vedeu/geometry/horizontal_alignment.rb
vedeu-0.6.57 lib/vedeu/geometry/horizontal_alignment.rb
vedeu-0.6.56 lib/vedeu/geometry/horizontal_alignment.rb
vedeu-0.6.54 lib/vedeu/geometry/horizontal_alignment.rb
vedeu-0.6.53 lib/vedeu/geometry/horizontal_alignment.rb
vedeu-0.6.52 lib/vedeu/geometry/horizontal_alignment.rb
vedeu-0.6.51 lib/vedeu/geometry/horizontal_alignment.rb