OSDN Git Service

Merge branch 'v06' of git.sourceforge.jp:/gitroot/pettanr/pettanr into v06
[pettanr/pettanr.git] / lib / manifest / controller / action / base.rb
1 module Manifest
2   module ControllerModule
3     module ActionModule
4       class Base
5         attr :controller, :action_name, :action_manifest, 
6           :item_name
7         def initialize controller, action_name, action_manifest
8           @controller = controller
9           @action_name = action_name
10           @action_manifest = action_manifest
11           self.set_default
12           self.init
13         end
14         
15         def set_default
16           @action_manifest['args'] ||= {}
17           @action_manifest['args']['item_name'] ||= self.controller.item_name
18         end
19         
20         def init
21           @args = @action_manifest['args']
22           @item_name = @args['item_name']
23         end
24         
25         def controller_name
26           @controller.controller_name
27         end
28         
29         def controller_manifest
30           @controller.controller_manifest
31         end
32         
33       end
34       
35     end
36   end
37 end