Module: Vedeu::DSL::Text
Overview
Provides helper methods for building views.
Instance Method Summary collapse
-
#text(value = '', options = {}) ⇒ String
(also: #text=, #align, #center, #centre, #left, #right, #align=, #center=, #centre=, #left=, #right=)
right ‘This will be right aligned.’, width: 35, anchor: centre # => ‘ This will be right aligned.’.
Instance Method Details
#text(value = '', options = {}) ⇒ String Also known as: text=, align, center, centre, left, right, align=, center=, centre=, left=, right=
right ‘This will be right aligned.’, width: 35, anchor: centre
# => ' This will be right aligned.'
text 'This will be truncated here. More text here.', width: 28
# => 'This will be truncated here.'
text 'Padded with hyphens.', width: 25, pad: '-', anchor: :right
# => '-----Padded with hyphens.'
56 57 58 59 60 |
# File 'lib/vedeu/dsl/text.rb', line 56 def text(value = '', = {}) .merge!(anchor: __callee__, model: model) Vedeu::Output::Text.add(value, ) end |