Class: ViewAssets::Packager::ActionsMap
- Inherits:
-
Object
- Object
- ViewAssets::Packager::ActionsMap
- Defined in:
- lib/view_assets/packager/actions_map.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#retrieve ⇒ Object
> { :controller1 => [:action1, :action2, ..], ..}.
Instance Method Details
#retrieve ⇒ Object
Returns => { :controller1 => [:action1, :action2, ..], ..}.
5 6 7 8 9 10 11 12 13 14 |
# File 'lib/view_assets/packager/actions_map.rb', line 5 def retrieve action_path.children.select(&:directory?).each_with_object({}) do |controller, action_map| all_children = controller.children.map do |action| action.basename.to_s.chomp(action.extname) end controller_name = controller.basename.to_s action_map[controller.basename.to_s] = all_children.select { |action| action.to_s != controller_name } end end |