Sha256: 74201506c42527256229accc2640f6a145d37a99579e9e44048bf28049eb6544

Contents?: true

Size: 1.51 KB

Versions: 3

Compression:

Stored size: 1.51 KB

Contents

module Bunto
  class Converter < Plugin
    # Public: Get or set the highlighter prefix. When an argument is specified,
    # the prefix will be set. If no argument is specified, the current prefix
    # will be returned.
    #
    # highlighter_prefix - The String prefix (default: nil).
    #
    # Returns the String prefix.
    def self.highlighter_prefix(highlighter_prefix = nil)
      if !defined?(@highlighter_prefix) || !highlighter_prefix.nil?
        @highlighter_prefix = highlighter_prefix
      end
      @highlighter_prefix
    end

    # Public: Get or set the highlighter suffix. When an argument is specified,
    # the suffix will be set. If no argument is specified, the current suffix
    # will be returned.
    #
    # highlighter_suffix - The String suffix (default: nil).
    #
    # Returns the String suffix.
    def self.highlighter_suffix(highlighter_suffix = nil)
      if !defined?(@highlighter_suffix) || !highlighter_suffix.nil?
        @highlighter_suffix = highlighter_suffix
      end
      @highlighter_suffix
    end

    # Initialize the converter.
    #
    # Returns an initialized Converter.
    def initialize(config = {})
      @config = config
    end

    # Get the highlighter prefix.
    #
    # Returns the String prefix.
    def highlighter_prefix
      self.class.highlighter_prefix
    end

    # Get the highlighter suffix.
    #
    # Returns the String suffix.
    def highlighter_suffix
      self.class.highlighter_suffix
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
bunto-3.4.5 lib/bunto/converter.rb
bunto-3.2.1 lib/bunto/converter.rb
bunto-3.0.0 lib/bunto/converter.rb