module Merb module MerbAdmin module ApplicationHelper # @param *segments Path segments to append. # # @return # A path relative to the public directory, with added segments. def image_path(*segments) public_path_for(:image, *segments) end # @param *segments Path segments to append. # # @return # A path relative to the public directory, with added segments. def javascript_path(*segments) public_path_for(:javascript, *segments) end # @param *segments Path segments to append. # # @return # A path relative to the public directory, with added segments. def stylesheet_path(*segments) public_path_for(:stylesheet, *segments) end # Construct a path relative to the public directory # # @param The type of component. # @param *segments Path segments to append. # # @return # A path relative to the public directory, with added segments. def public_path_for(type, *segments) ::MerbAdmin.public_path_for(type, *segments) end # Construct an app-level path. # # @param The type of component. # @param *segments Path segments to append. # # @return # A path within the host application, with added segments. def app_path_for(type, *segments) ::MerbAdmin.app_path_for(type, *segments) end # Construct a slice-level path. # # @param The type of component. # @param *segments Path segments to append. # # @return # A path within the slice source (Gem), with added segments. def slice_path_for(type, *segments) ::MerbAdmin.slice_path_for(type, *segments) end end end end