Sha256: 74cb08373eebfa50621b6c948de003c7bcd0b59d2efbb11a011dff1e461087b8

Contents?: true

Size: 560 Bytes

Versions: 15

Compression:

Stored size: 560 Bytes

Contents

PADRINO_ROOT = File.dirname(__FILE__) unless defined? PADRINO_ROOT

module LibDemo
  def self.give_me_a_random
    @rand ||= rand(100)
  end
end

class Complex1Demo < Padrino::Application
  set :reload, true
  get("/old"){ "Old Sinatra Way" }
end

class Complex2Demo < Padrino::Application
  set :reload, true
  get("/old"){ "Old Sinatra Way" }
end

Complex1Demo.controllers do
  get("(/)"){ "Given random #{LibDemo.give_me_a_random}" }
end

Complex2Demo.controllers do
  get("(/)"){ "The magick number is: 78!" } # Change only the number!!!
end

Padrino.load!

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
padrino-core-0.8.1 test/fixtures/apps/complex.rb
padrino-core-0.8.0 test/fixtures/apps/complex.rb
padrino-core-0.7.9 test/fixtures/apps/complex.rb
padrino-core-0.7.8 test/fixtures/apps/complex.rb
padrino-core-0.7.7 test/fixtures/apps/complex.rb
padrino-core-0.7.6 test/fixtures/apps/complex.rb
padrino-core-0.7.5 test/fixtures/apps/complex.rb
padrino-core-0.7.4 test/fixtures/apps/complex.rb
padrino-core-0.7.3 test/fixtures/apps/complex.rb
padrino-core-0.7.2 test/fixtures/apps/complex.rb
padrino-core-0.7.1 test/fixtures/apps/complex.rb
padrino-core-0.7.0 test/fixtures/apps/complex.rb
padrino-core-0.6.7 test/fixtures/apps/complex.rb
padrino-core-0.6.3 test/fixtures/apps/complex.rb
padrino-core-0.6.2 test/fixtures/apps/complex.rb