Class: ActionController::Base
- Inherits:
-
Object
- Object
- ActionController::Base
- Defined in:
- lib/guerrilla_rotate.rb
Class Method Summary collapse
- ._gr_gpath(c, a) ⇒ Object
- .guerrilla_rotate(*actions) ⇒ Object (also: guerilla_rotate)
Class Method Details
._gr_gpath(c, a) ⇒ Object
43 44 45 |
# File 'lib/guerrilla_rotate.rb', line 43 def self._gr_gpath(c,a) File.join(c.to_s, a.to_s) end |
.guerrilla_rotate(*actions) ⇒ Object Also known as: guerilla_rotate
5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/guerrilla_rotate.rb', line 5 def guerrilla_rotate( *actions ) @@guerrilla_paths = {} actions.each do |a| catch (:next_path) do view_paths.each do |vp| Dir.chdir(vp) do gpath = _gr_gpath(controller_name, a) guerrilla_paths[gpath] = Dir.glob(gpath + '*') and throw :next_path end end end end end |