Module: SimpleFormMarkdownEditor

Defined in:
lib/simple_form_markdown_editor.rb,
lib/simple_form_markdown_editor/engine.rb,
lib/simple_form_markdown_editor/version.rb,
lib/simple_form_markdown_editor/renderer.rb,
lib/simple_form_markdown_editor/configuration.rb,
lib/simple_form_markdown_editor/markdown_editor_input.rb,
app/controllers/simple_form_markdown_editor/previews_controller.rb

Defined Under Namespace

Classes: Configuration, Engine, MarkdownEditorInput, PreviewsController, Renderer

Constant Summary collapse

VERSION =
'1.0.0'.freeze

Class Method Summary collapse

Class Method Details

.dom_class(*args) ⇒ Object


12
13
14
15
16
17
18
19
20
# File 'lib/simple_form_markdown_editor.rb', line 12

def self.dom_class(*args)
  prefix, alts = args.partition { |i| !i.is_a?(Array) }
  prefix = ['simple_form_markdown_editor'] + prefix
  return prefix.compact.join('__') if alts.empty?
  alts.flatten.map do |item|
    prefix += [item]
    prefix.compact.join('__')
  end
end