Method: Primer::Beta::Markdown#initialize

Defined in:
app/components/primer/beta/markdown.rb

#initialize(tag: DEFAULT_TAG, **system_arguments) ⇒ Markdown

Returns a new instance of Markdown.

Parameters:

  • tag (Symbol) (defaults to: DEFAULT_TAG)

    <%= one_of(Primer::Beta::Markdown::TAG_OPTIONS) %>

  • system_arguments (Hash)

    <%= link_to_system_arguments_docs %>

[View source]

14
15
16
17
18
19
20
21
22
# File 'app/components/primer/beta/markdown.rb', line 14

def initialize(tag: DEFAULT_TAG, **system_arguments)
  @system_arguments = system_arguments
  @system_arguments[:tag] = fetch_or_fallback(TAG_OPTIONS, tag, DEFAULT_TAG)

  @system_arguments[:classes] = class_names(
    "markdown-body",
    system_arguments[:classes]
  )
end