Module: Restapi::Helpers
- Included in:
- Restapi
- Defined in:
- lib/restapi/helpers.rb
Instance Method Summary collapse
Instance Method Details
#full_url(path) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/restapi/helpers.rb', line 7 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 |
#markup_to_html(text) ⇒ Object
3 4 5 |
# File 'lib/restapi/helpers.rb', line 3 def markup_to_html(text) Restapi.configuration.markup.to_html(text.strip_heredoc) end |