Sha256: a34b76c5353cf6799cfabc8d96f3988bdef537116543ddc26743c2dd90a753de

Contents?: true

Size: 442 Bytes

Versions: 2

Compression:

Stored size: 442 Bytes

Contents

module Restapi
  module Helpers
    def markup_to_html(text)
      Restapi.configuration.markup.to_html(text.strip_heredoc)
    end

    def full_url(path)
      unless @prefix
        @prefix = ""
        if rails_prefix = ENV["RAILS_RELATIVE_URL_ROOT"]
          @prefix << rails_prefix
        end
        @prefix << Restapi.configuration.doc_base_url
      end
      path = path.sub(/^\//,"")
      "#{@prefix}/#{path}"
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
restapi-0.0.4 lib/restapi/helpers.rb
restapi-0.0.3 lib/restapi/helpers.rb