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