class Asciidoctor::Stylesheets

QUESTION create method for user stylesheet?
QUESTION create methods for link_*_stylesheet?

A utility class for working with the built-in stylesheets.

def self.instance

def self.instance
  @__instance__
end

def coderay_stylesheet_data

returns the [String] CodeRay stylesheet data

Public: Read the contents of the default CodeRay stylesheet
def coderay_stylesheet_data
  (SyntaxHighlighter.for 'coderay').read_stylesheet
end

def coderay_stylesheet_name

def coderay_stylesheet_name
  (SyntaxHighlighter.for 'coderay').stylesheet_basename
end

def embed_coderay_stylesheet

Returns the [String] CodeRay stylesheet data wrapped in a

def embed_primary_stylesheet

Returns the [String] primary stylesheet data wrapped in a

def embed_pygments_stylesheet style = nil

Returns the [String] Pygments stylesheet data for the specified style wrapped in a

def primary_stylesheet_data

returns the [String] Asciidoctor stylesheet data

Public: Read the contents of the default Asciidoctor stylesheet
def primary_stylesheet_data
  @primary_stylesheet_data ||= (::File.read (::File.join STYLESHEETS_DIR, 'asciidoctor-default.css'), mode: FILE_READ_MODE).rstrip
end

def primary_stylesheet_name

def primary_stylesheet_name
  DEFAULT_STYLESHEET_NAME
end

def pygments_stylesheet_data style = nil

returns the [String] Pygments stylesheet data

Public: Generate the Pygments stylesheet with the specified style.
def pygments_stylesheet_data style = nil
  (SyntaxHighlighter.for 'pygments').read_stylesheet style
end

def pygments_stylesheet_name style = nil

def pygments_stylesheet_name style = nil
  (SyntaxHighlighter.for 'pygments').stylesheet_basename style
end

def write_coderay_stylesheet target_dir = '.'

def write_coderay_stylesheet target_dir = '.'
  ::File.write (::File.join target_dir, coderay_stylesheet_name), coderay_stylesheet_data, mode: FILE_WRITE_MODE
end

def write_primary_stylesheet target_dir = '.'

def write_primary_stylesheet target_dir = '.'
  ::File.write (::File.join target_dir, primary_stylesheet_name), primary_stylesheet_data, mode: FILE_WRITE_MODE
end

def write_pygments_stylesheet target_dir = '.', style = nil

def write_pygments_stylesheet target_dir = '.', style = nil
  ::File.write (::File.join target_dir, (pygments_stylesheet_name style)), (pygments_stylesheet_data style), mode: FILE_WRITE_MODE
end