Sha256: 620daee35aa0fa7be66f0149f2b482c62ccaa7a2b52c2c46f2b8d9dcaad5ad69

Contents?: true

Size: 745 Bytes

Versions: 3

Compression:

Stored size: 745 Bytes

Contents

#!/usr/bin/env ruby

lib_dir = File.dirname(__FILE__) + '/../lib'
$LOAD_PATH.unshift(lib_dir) unless $LOAD_PATH.include?(lib_dir)

require 'vedeu'

# An example application to demonstrate colours.
#
class VedeuColoursApp

  include Vedeu

  configure do
    debug!
    log '/tmp/vedeu_colours_app.log'
  end

  interface 'colours_256' do
    geometry do
      centred!
      height 16
      width  80
    end
  end

  renders do
    view('colours_256') do
      lines do
        0.upto(16) do |row|
          line do
            0.upto(15) do |column|
              code = (row * 15) + column
              right "#{code}", width: 5, background: code, foreground: '#ffffff'
            end
          end
        end
      end
    end
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
vedeu-0.4.18 examples/colours_app.rb
vedeu-0.4.17 examples/colours_app.rb
vedeu-0.4.16 examples/colours_app.rb