Sha256: ef7049e6fd34bd6e2ae6fbde534d00673129992378f09ad610b66ba957c98507

Contents?: true

Size: 1.56 KB

Versions: 1

Compression:

Stored size: 1.56 KB

Contents

module YARD
  VERSION = "0.6.8"
  
  # The root path for YARD source libraries
  ROOT = File.expand_path(File.dirname(__FILE__))
  
  # The root path for YARD builtin templates
  TEMPLATE_ROOT = File.join(ROOT, '..', 'templates')
  
  # @deprecated Use {Config::CONFIG_DIR}
  CONFIG_DIR = File.expand_path('~/.yard')
  
  # An alias to {Parser::SourceParser}'s parsing method
  # 
  # @example Parse a glob of files
  #   YARD.parse('lib/**/*.rb')
  # @see Parser::SourceParser.parse
  def self.parse(*args) Parser::SourceParser.parse(*args) end

  # An alias to {Parser::SourceParser}'s parsing method
  # 
  # @example Parse a string of input
  #   YARD.parse_string('class Foo; end')
  # @see Parser::SourceParser.parse_string
  def self.parse_string(*args) Parser::SourceParser.parse_string(*args) end
  
  # (see YARD::Config.load_plugins)
  # @deprecated Use {Config.load_plugins}
  def self.load_plugins; YARD::Config.load_plugins end
end

# Keep track of Ruby version for compatibility code
RUBY19, RUBY18 = *(RUBY_VERSION >= "1.9.1" ? [true, false] : [false, true])

# Whether or not continuations are (properly) supported
begin
  begin; require 'continuation'; rescue LoadError; end
  cc = callcc {|cc| cc }; cc.call if cc
  CONTINUATIONS_SUPPORTED = true
rescue
  CONTINUATIONS_SUPPORTED = false
end

# Load Ruby core extension classes
Dir.glob(File.join(YARD::ROOT, 'yard', 'core_ext', '*.rb')).each do |file|
  require file
end

['autoload', 'globals'].each do |file| 
  require File.join(YARD::ROOT, 'yard', file)
end

# Load YARD configuration options (and plugins)
YARD::Config.load

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
yard-0.6.8 lib/yard.rb