Sha256: 59ac54cacfdc424f906ceb0c4cdf2222476d30cd31c1d4bbb3fca22c62c97879

Contents?: true

Size: 413 Bytes

Versions: 1

Compression:

Stored size: 413 Bytes

Contents

# frozen_string_literal: true

class Dictionary < Shoes
  url '/',      :index
  url '/(\w+)', :word

  def index
    stack do
      title "Enter a Word"
      @word = edit_line
      button "OK" do
        visit "/#{@word.text}"
      end
    end
  end

  def word(string)
    stack do
      para "No definition found for #{string}. ",
           "Sorry this doesn't actually work."
    end
  end
end

Shoes.app

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
shoes-4.0.0.rc1 samples/nks_dictionary.rb