meekish / swxruby
- Source
- Commits
- Network (1)
- Issues (0)
- Downloads (0)
- Wiki (1)
- Graphs
-
Tree:
60f5761
Jed Hurt (author)
Tue Mar 11 17:24:48 -0700 2008
| 60f5761d » | Jed Hurt | 2008-03-11 | 1 | $:.unshift '/Users/Jed/Development/Libraries/swxruby/lib' | |
| 2 | require 'swxruby' | ||||
| 3 | |||||
| 4 | # ================= | ||||
| 5 | # = Service Class = | ||||
| 6 | # ================= | ||||
| 7 | class SwxServiceClasses::HelloMerb | ||||
| 8 | def just_say_the_words | ||||
| 9 | 'Hello from Merb!' | ||||
| 10 | end | ||||
| 11 | end | ||||
| 12 | |||||
| 13 | # ==================== | ||||
| 14 | # = Merb Application = | ||||
| 15 | # ==================== | ||||
| 16 | Merb::Router.prepare { |r| r.match('/').to(:controller => 'swx_ruby', :action =>'gateway') } | ||||
| 17 | |||||
| 18 | class SwxRuby < Merb::Controller | ||||
| 19 | def gateway | ||||
| 20 | send_data(SwxGateway.process(params), :filename => 'data.swf', :type => 'application/swf') | ||||
| 21 | end | ||||
| 22 | end | ||||
