Sha256: 98870df700c5a68efdf44f96e68584a4de968621c674c7d3c5efaeea20021ec3

Contents?: true

Size: 1.93 KB

Versions: 30

Compression:

Stored size: 1.93 KB

Contents

module Merb
  module MerbAdmin
    module ApplicationHelper

      # @param *segments<Array[#to_s]> Path segments to append.
      #
      # @return <String> 
      #  A path relative to the public directory, with added segments.
      def image_path(*segments)
        public_path_for(:image, *segments)
      end

      # @param *segments<Array[#to_s]> Path segments to append.
      #
      # @return <String> 
      #  A path relative to the public directory, with added segments.
      def javascript_path(*segments)
        public_path_for(:javascript, *segments)
      end

      # @param *segments<Array[#to_s]> Path segments to append.
      #
      # @return <String> 
      #  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 <Symbol> The type of component.
      # @param *segments<Array[#to_s]> Path segments to append.
      #
      # @return <String> 
      #  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 <Symbol> The type of component.
      # @param *segments<Array[#to_s]> Path segments to append.
      #
      # @return <String> 
      #  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 <Symbol> The type of component.
      # @param *segments<Array[#to_s]> Path segments to append.
      #
      # @return <String> 
      #  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

Version data entries

30 entries across 30 versions & 2 rubygems

Version Path
sferik-merb-admin-0.1.8 app/helpers/application_helper.rb
sferik-merb-admin-0.1.9 app/helpers/application_helper.rb
sferik-merb-admin-0.2.0 app/helpers/application_helper.rb
sferik-merb-admin-0.2.1 app/helpers/application_helper.rb
sferik-merb-admin-0.2.2 app/helpers/application_helper.rb
sferik-merb-admin-0.2.3 app/helpers/application_helper.rb
sferik-merb-admin-0.2.4 app/helpers/application_helper.rb
sferik-merb-admin-0.2.5 app/helpers/application_helper.rb
sferik-merb-admin-0.2.6 app/helpers/application_helper.rb
sferik-merb-admin-0.2.7 app/helpers/application_helper.rb
sferik-merb-admin-0.2.8 app/helpers/application_helper.rb
sferik-merb-admin-0.3.0 app/helpers/application_helper.rb
sferik-merb-admin-0.3.1 app/helpers/application_helper.rb
sferik-merb-admin-0.3.2 app/helpers/application_helper.rb
sferik-merb-admin-0.3.3 app/helpers/application_helper.rb
sferik-merb-admin-0.3.4 app/helpers/application_helper.rb
sferik-merb-admin-0.3.6 app/helpers/application_helper.rb
sferik-merb-admin-0.4.0 app/helpers/application_helper.rb
sferik-merb-admin-0.4.1 app/helpers/application_helper.rb
sferik-merb-admin-0.4.2 app/helpers/application_helper.rb