Sha256: 01197e730e618ae327639051511888923bb9947b1c2b5469b8ee663c7e590005
Contents?: true
Size: 798 Bytes
Versions: 2
Compression:
Stored size: 798 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 bind(:_initialize_) { Vedeu.trigger(:_refresh_) } 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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
vedeu-0.4.15 | examples/colours_app.rb |
vedeu-0.4.14 | examples/colours_app.rb |