sinatras-hat 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/sinatras-hat/action.rb +15 -0
  2. metadata +3 -2
@@ -0,0 +1,15 @@
1
+ module Sinatra
2
+ module Hat
3
+ class Action
4
+ attr_reader :maker, :handler
5
+
6
+ def initialize(maker, name, handler)
7
+ @maker, @handler = maker, handler
8
+ end
9
+
10
+ def handle(event)
11
+ handler[event.params]
12
+ end
13
+ end
14
+ end
15
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sinatras-hat
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pat Nakajima
@@ -56,11 +56,12 @@ files:
56
56
  - lib/core_ext/array.rb
57
57
  - lib/core_ext/object.rb
58
58
  - lib/sinatras-hat
59
+ - lib/sinatras-hat.rb
59
60
  - lib/sinatras-hat/maker.rb
61
+ - lib/sinatras-hat/action.rb
60
62
  - lib/sinatras-hat/actions.rb
61
63
  - lib/sinatras-hat/auth.rb
62
64
  - lib/sinatras-hat/responses.rb
63
- - lib/sinatras-hat.rb
64
65
  has_rdoc: false
65
66
  homepage:
66
67
  post_install_message: