-
Notifications
You must be signed in to change notification settings - Fork 1
/
schaf.rb
35 lines (26 loc) · 908 Bytes
/
schaf.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
require 'camping'
Camping.goes :Schaf
module Schaf::Controllers
class Index < R '/'
def get
render :index
end
end
class Page < R '/(\w+)'
def get(page_name)
render page_name
end
end
module Schaf::Views
def index
h2 'odin and thor website', :class => 'fill'
p 'Hello Thor and Odin :)'
p 'Welcome to 1.ai'
p 'githubtest'
ul do
li { a '1.ai', :href => 'http://1.ai' }
li { a 'camping', :href => 'http://camping.io' }
end
end
end
end