Sha256: 5cb6f8c5434a652a4d4726c811c59ec8df7bb8da7fc1a087900d3160ffad8a4d

Contents?: true

Size: 647 Bytes

Versions: 15

Compression:

Stored size: 647 Bytes

Contents

module Vedeu

  module Geometry

    # Provides the mechanism to align an interface/view vertically
    # within the available terminal space.
    #
    class VerticalAlignment < 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 vertical alignment value given. Valid values are :bottom, ' \
             ':middle, :none, :top.'.freeze
      end

    end # VerticalAlignment

  end # Geometry

end # Vedeu

Version data entries

15 entries across 15 versions & 1 rubygems

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