class Shortcode::Configuration
Attributes
attribute_quote_type[RW]
Set the quotation sign used for attribute values. Defaults to double quote (“)
check_config_templates_first[RW]
Allows setting whether templates on the configuration are checked first, or templates in the file system
helpers[RW]
Assigns helper modules to be included in templates
presenters[RW]
Allows presenters to be set that can be used to process shortcode arguments before rendered
template_parser[RW]
Sets the template parser to use, supports :erb, :haml, and :slim, default is :haml
template_path[RW]
Sets the path to search for template files
templates[RW]
Allows templates to be set from strings rather than read from the filesystem
use_attribute_quotes[RW]
Allows quotes around attributes to be omitted. Defaults to false (quotes must be present around the value)
Public Class Methods
new()
click to toggle source
# File lib/shortcode/configuration.rb, line 39 def initialize @template_parser = :erb @template_path = "app/views/shortcode_templates" @templates = {} @check_config_templates_first = true @helpers = [] @block_tags = [] @self_closing_tags = [] @attribute_quote_type = '"' @use_attribute_quotes = true @presenters = {} end
Public Instance Methods
register_presenter(presenter)
click to toggle source
# File lib/shortcode/configuration.rb, line 52 def register_presenter(presenter) Shortcode::Presenter.register(self, presenter) end