Sha256: f8fbcd78d5146cc58b15b377fd0f016683196e29ae01ce75015933aa67b42c93

Contents?: true

Size: 965 Bytes

Versions: 24

Compression:

Stored size: 965 Bytes

Contents

#!/usr/bin/env ruby

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

trap('INT') { exit! }

# require 'bundler/setup' # uncomment to remove the need to do `bundle exec`.
require 'vedeu'

# An example application to demonstrate 'Hello World'.
#
# If you have cloned this repository from GitHub, you can run this example:
#
#     ./examples/hello_world.rb
#
class HelloWorldApp

  include Vedeu

  configure do
    # debug!
    log '/tmp/vedeu_hello_world.log'
  end

  interface 'messages' do
    background '#000000'
    foreground '#00ff00'
    geometry do
      centred!
      height   3
      width    20
    end
  end

  renders do
    view 'messages' do
      lines do
        centre 'Hello World!', width: 20
        line
        centre "Press 'q' to exit.", width: 20
      end
    end
  end

  def self.start(argv = ARGV)
    Vedeu::Launcher.execute!(argv)
  end

end

HelloWorldApp.start(ARGV)

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
vedeu-0.4.36 examples/hello_world.rb
vedeu-0.4.35 examples/hello_world.rb
vedeu-0.4.34 examples/hello_world.rb
vedeu-0.4.33 examples/hello_world.rb