Sha256: ef6bb7bf0e45be2da4a70ad0db8b9bf29eb1e3f25f8240793e8b3408059af633

Contents?: true

Size: 689 Bytes

Versions: 5

Compression:

Stored size: 689 Bytes

Contents

require 'whirled_peas'

class TemplateFactory
  def build(*)
    WhirledPeas.template do |composer|
      composer.add_grid do |composer, settings|
        settings.num_cols = 2
        composer.add_box('Alignment') do |composer, settings|
          settings.flow = :t2b
          settings.full_border
          settings.align = :left
          # Keep the title long so grids below will be wide enough to use the
          # alignment attribute. Don't rely on the `width` attribute to keep
          # `align` isolated in this test.
          composer.add_text('Title') { 'This is an aligned box' }
          composer.add_text('Content') { 'Left' }
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
whirled_peas-0.9.1 screen_test/settings/align/box_left.rb
whirled_peas-0.9.0 screen_test/settings/align/box_left.rb
whirled_peas-0.8.0 screen_test/settings/align/box_left.rb
whirled_peas-0.7.1 screen_test/settings/align/box_left.rb
whirled_peas-0.7.0 screen_test/settings/align/box_left.rb