Sha256: d2c65a16f1445dc1340c254fc8ce6037066388ae1e25f4b11cfc96e55d0a0f3e

Contents?: true

Size: 743 Bytes

Versions: 9

Compression:

Stored size: 743 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

9 entries across 9 versions & 1 rubygems

Version Path
vedeu-0.4.27 examples/colours_app.rb
vedeu-0.4.26 examples/colours_app.rb
vedeu-0.4.25 examples/colours_app.rb
vedeu-0.4.24 examples/colours_app.rb
vedeu-0.4.23 examples/colours_app.rb
vedeu-0.4.22 examples/colours_app.rb
vedeu-0.4.21 examples/colours_app.rb
vedeu-0.4.20 examples/colours_app.rb
vedeu-0.4.19 examples/colours_app.rb