Sha256: 53ad5450c8f113580bebd05c99b1b81699d7e6ee57530fff32c2712710446bc6
Contents?: true
Size: 947 Bytes
Versions: 3
Compression:
Stored size: 947 Bytes
Contents
module ViewAssets module Packager class ActionsMap # # => # { # :controller1 => [:action1, :action2, ..], # .. # } 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 private def action_path Pathname.new(PathInfo.new("#{APP_FOLDER}/#{asset_path}").abs) end end class JsActionsMap < ActionsMap def asset_path JS_PATH end def method_name end end class CssActionsMap < ActionsMap def asset_path CSS_PATH end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
view_assets-1.0.4 | lib/view_assets/packager/actions_map.rb |
view_assets-1.0.3 | lib/view_assets/packager/actions_map.rb |
view_assets-1.0.0 | lib/view_assets/packager/actions_map.rb |