Create note on discontinued development
[merb_mart.git] / app / helpers / application_helper.rb
blob8b65af3c369410ed7b66dc4ba7bf1ee797c61e0e
1 module Merb
2   module MerbMart
3     module ApplicationHelper
5       # @param *segments<Array[#to_s]> Path segments to append.
6       #
7       # @return <String>
8       #  A path relative to the public directory, with added segments.
9       def image_path(*segments)
10         public_path_for(:image, *segments)
11       end
13       # @param *segments<Array[#to_s]> Path segments to append.
14       #
15       # @return <String>
16       #  A path relative to the public directory, with added segments.
17       def javascript_path(*segments)
18         public_path_for(:javascript, *segments)
19       end
21       # @param *segments<Array[#to_s]> Path segments to append.
22       #
23       # @return <String>
24       #  A path relative to the public directory, with added segments.
25       def stylesheet_path(*segments)
26         public_path_for(:stylesheet, *segments)
27       end
29       # Construct a path relative to the public directory
30       #
31       # @param <Symbol> The type of component.
32       # @param *segments<Array[#to_s]> Path segments to append.
33       #
34       # @return <String>
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)
38       end
40       # Construct an app-level path.
41       #
42       # @param <Symbol> The type of component.
43       # @param *segments<Array[#to_s]> Path segments to append.
44       #
45       # @return <String>
46       #  A path within the host application, with added segments.
47       def app_path_for(type, *segments)
48         ::MerbMart.app_path_for(type, *segments)
49       end
51       # Construct a slice-level path.
52       #
53       # @param <Symbol> The type of component.
54       # @param *segments<Array[#to_s]> Path segments to append.
55       #
56       # @return <String>
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)
60       end
62     end
63   end
64 end