Sha256: 8d6f8b0e40389d574282bbaa8c693fca5ca0d8685a6cf5fad3a28b6794db75a6

Contents?: true

Size: 664 Bytes

Versions: 15

Compression:

Stored size: 664 Bytes

Contents

module Vedeu

  module Geometry

    # Provides the mechanism to align an interface/view horizontally
    # within the available terminal space.
    #
    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

15 entries across 15 versions & 1 rubygems

Version Path
vedeu-0.6.50 lib/vedeu/geometry/horizontal_alignment.rb
vedeu-0.6.49 lib/vedeu/geometry/horizontal_alignment.rb
vedeu-0.6.48 lib/vedeu/geometry/horizontal_alignment.rb
vedeu-0.6.47 lib/vedeu/geometry/horizontal_alignment.rb
vedeu-0.6.46 lib/vedeu/geometry/horizontal_alignment.rb
vedeu-0.6.45 lib/vedeu/geometry/horizontal_alignment.rb
vedeu-0.6.44 lib/vedeu/geometry/horizontal_alignment.rb
vedeu-0.6.43 lib/vedeu/geometry/horizontal_alignment.rb
vedeu-0.6.42 lib/vedeu/geometry/horizontal_alignment.rb
vedeu-0.6.41 lib/vedeu/geometry/horizontal_alignment.rb
vedeu-0.6.40 lib/vedeu/geometry/horizontal_alignment.rb
vedeu-0.6.39 lib/vedeu/geometry/horizontal_alignment.rb
vedeu-0.6.38 lib/vedeu/geometry/horizontal_alignment.rb
vedeu-0.6.37 lib/vedeu/geometry/horizontal_alignment.rb
vedeu-0.6.36 lib/vedeu/geometry/horizontal_alignment.rb