3 module ApplicationHelper
5 # @param *segments<Array[#to_s]> Path segments to append.
8 # A path relative to the public directory, with added segments.
9 def image_path(*segments)
10 public_path_for(:image, *segments)
13 # @param *segments<Array[#to_s]> Path segments to append.
16 # A path relative to the public directory, with added segments.
17 def javascript_path(*segments)
18 public_path_for(:javascript, *segments)
21 # @param *segments<Array[#to_s]> Path segments to append.
24 # A path relative to the public directory, with added segments.
25 def stylesheet_path(*segments)
26 public_path_for(:stylesheet, *segments)
29 # Construct a path relative to the public directory
31 # @param <Symbol> The type of component.
32 # @param *segments<Array[#to_s]> Path segments to append.
35 # A path relative to the public directory, with added segments.
36 def public_path_for(type, *segments)
37 ::MerbMart.public_path_for(type, *segments)
40 # Construct an app-level path.
42 # @param <Symbol> The type of component.
43 # @param *segments<Array[#to_s]> Path segments to append.
46 # A path within the host application, with added segments.
47 def app_path_for(type, *segments)
48 ::MerbMart.app_path_for(type, *segments)
51 # Construct a slice-level path.
53 # @param <Symbol> The type of component.
54 # @param *segments<Array[#to_s]> Path segments to append.
57 # A path within the slice source (Gem), with added segments.
58 def slice_path_for(type, *segments)
59 ::MerbMart.slice_path_for(type, *segments)