Class: Vedeu::Coercers::HorizontalAlignment Private

Inherits:
Alignment
  • Object
show all
Defined in:
lib/vedeu/coercers/horizontal_alignment.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Provides the mechanism to validate a horizontal alignment value.

Instance Method Summary collapse

Constructor Details

This class inherits a constructor from Vedeu::Coercers::Alignment

Instance Method Details

#to_sentenceString (private)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (String)


26
27
28
# File 'lib/vedeu/coercers/horizontal_alignment.rb', line 26

def to_sentence
  Vedeu::Sentence.construct(horizontal_values)
end

#validateBoolean

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

Raises:

  • (Vedeu::Error::InvalidSyntax)

    When the value given for an argument or parameter cannot be used because it is not valid for the use case, unsupported or the method expects a different type.



15
16
17
18
19
20
21
# File 'lib/vedeu/coercers/horizontal_alignment.rb', line 15

def validate
  return coerce if valid_horizontal?

  fail Vedeu::Error::InvalidSyntax,
       'Missing or invalid horizontal alignment value. ' \
       "Valid values are: #{to_sentence}"
end