Class: Vedeu::Coercers::VerticalAlignment Private
- Defined in:
- lib/vedeu/coercers/vertical_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 vertical alignment value.
Instance Attribute Summary
Attributes inherited from Alignment
Instance Method Summary collapse
- #to_sentence ⇒ String private private
- #validate ⇒ Boolean private
Methods inherited from Alignment
#bottom_aligned?, #centre_aligned?, coerce, #coerce, #eql?, #horizontal_values, #initialize, #invalid?, #left_aligned?, #middle_aligned?, #right_aligned?, #top_aligned?, #unaligned?, #valid?, #valid_horizontal?, #valid_type?, #valid_vertical?, validate, #values, #vertical_values
Methods included from Vedeu::Common
#absent?, #array?, #boolean, #boolean?, #empty_value?, #escape?, #falsy?, #hash?, #line_model?, #numeric?, #positionable?, #present?, #snake_case, #stream_model?, #string?, #symbol?, #truthy?, #view_model?
Constructor Details
This class inherits a constructor from Vedeu::Coercers::Alignment
Instance Method Details
#to_sentence ⇒ String (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.
26 27 28 |
# File 'lib/vedeu/coercers/vertical_alignment.rb', line 26 def to_sentence Vedeu::Sentence.construct(vertical_values) end |
#validate ⇒ Boolean
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.
15 16 17 18 19 20 21 |
# File 'lib/vedeu/coercers/vertical_alignment.rb', line 15 def validate return coerce if valid_vertical? raise Vedeu::Error::InvalidSyntax, 'Missing or invalid vertical alignment value. ' \ "Valid values are: #{to_sentence}" end |