Sha256: 0a79321f3d1a8d8de48a3a881febf3570d1db95404f4b94676abbb8afd6087ed

Contents?: true

Size: 595 Bytes

Versions: 2

Compression:

Stored size: 595 Bytes

Contents

module ReverseAsciidoctor
  class Config
    attr_accessor :unknown_tags, :tag_border

    def initialize
      @unknown_tags     = :pass_through
      @em_delimiter     = '_'.freeze
      @strong_delimiter = '*'.freeze
      @inline_options   = {}
      @tag_border       = ' '.freeze
    end

    def with(options = {})
      @inline_options = options
      result = yield
      @inline_options = {}
      result
    end

    def unknown_tags
      @inline_options[:unknown_tags] || @unknown_tags
    end

    def tag_border
      @inline_options[:tag_border] || @tag_border
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
reverse_asciidoctor-0.2.0 lib/reverse_asciidoctor/config.rb
reverse_asciidoctor-0.1.0 lib/reverse_asciidoctor/config.rb