Sha256: 6ab34c034490ff31451aeebc524b569b5e22c3d4b5e556fc5238349b13589d8b

Contents?: true

Size: 760 Bytes

Versions: 17

Compression:

Stored size: 760 Bytes

Contents

# original code is http://shoes-tutorial-note.heroku.com/html/00409_No.9_Shoes.url.html

require '../lib/green_shoes'

class PhotoFrame < Shoes
  url '/', :index
  url '/loogink', :loogink
  url '/cy', :cy

  def index
    eval(['loogink', 'cy'][rand 2])
  end

  def loogink
    background tomato
    image './loogink.png', margin: [70, 10, 0, 0]
    para fg(strong('She is Loogink.'), white),
      '->', link(strong('Cy')){visit '/cy'},
      margin: 10
  end

  def cy
    background paleturquoise
    image './cy.png', margin: [70, 10, 0, 0]
    para fg(strong('He is Cy.'), gray), '  ->', 
      link(strong('loogink')){visit '/loogink'},
      margin: 10
  end
end

Shoes.app width: 200, height: 120, title: 'Photo Frame'

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
green_shoes-0.243.0 samples/sample35.rb
green_shoes-0.233.0 samples/sample35.rb
green_shoes-0.227.0 samples/sample35.rb
green_shoes-0.226.0 samples/sample35.rb
green_shoes-0.221.0 samples/sample35.rb
green_shoes-0.214.0 samples/sample35.rb
green_shoes-0.207.0 samples/sample35.rb
green_shoes-0.201.0 samples/sample35.rb
green_shoes-0.198.0 samples/sample35.rb
green_shoes-0.189.0 samples/sample35.rb
green_shoes-0.179.0 samples/sample35.rb
green_shoes-0.176.0 samples/sample35.rb
green_shoes-0.171.0 samples/sample35.rb
green_shoes-0.164.0 samples/sample35.rb
green_shoes-0.150.0 samples/sample35.rb
green_shoes-0.139.0 samples/sample35.rb
green_shoes-0.138.0 samples/sample35.rb