Class: Readiness::GitLab::Markdown
- Defined in:
- lib/support_readiness/gitlab/markdown.rb
Overview
Defines the class Markdown within the module Readiness::GitLab.
Class Method Summary collapse
-
.convert(client, text, gfm = false, project = 'gitlab-org/gitlab') ⇒ String
Renders text using Markdown.
Methods inherited from Client
auth_error, bad_request_error, convert_actions, convert_conditions, convert_standard_names_to_ids, convert_ticket_form_agent_conditions, convert_ticket_form_brands, convert_ticket_form_end_user_conditions, convert_ticket_form_names_to_ids, convert_view_names_to_ids, convert_view_restrictions, covert_ticket_form_field_ids, create_package!, erb_renderer, handle_request_error, not_found_error, not_processible_error, put_into_archive, recursively_deflate_directory, timestamp_filename, to_clean_json, to_clean_json_with_key, to_hash, to_nearly_clean_json, to_nearly_clean_json_with_key, to_param_string, write_entries
Class Method Details
.convert(client, text, gfm = false, project = 'gitlab-org/gitlab') ⇒ String
Renders text using Markdown
31 32 33 34 |
# File 'lib/support_readiness/gitlab/markdown.rb', line 31 def self.convert(client, text, gfm = false, project = 'gitlab-org/gitlab') response = client.connection.post 'markdown', { text: text, gfm: gfm, project: project }.to_json Oj.load(response.body)['html'] end |