Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/banzai/render_context.rb')
-rw-r--r--lib/banzai/render_context.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/banzai/render_context.rb b/lib/banzai/render_context.rb
index e30fc9f469b..a69732a26e2 100644
--- a/lib/banzai/render_context.rb
+++ b/lib/banzai/render_context.rb
@@ -4,13 +4,14 @@ module Banzai
# Object storing the current user, project, and other details used when
# parsing Markdown references.
class RenderContext
- attr_reader :current_user
+ attr_reader :current_user, :options
# default_project - The default project to use for all documents, if any.
# current_user - The user viewing the document, if any.
- def initialize(default_project = nil, current_user = nil)
+ def initialize(default_project = nil, current_user = nil, options: {})
@current_user = current_user
@projects = Hash.new(default_project)
+ @options = options
end
# Associates an HTML document with a Project.