module YARD
Constants
Public Class Methods
load_plugins()
click to toggle source
(see YARD::Config.load_plugins) @deprecated Use {Config.load_plugins}
# File lib/yard.rb, line 29 def self.load_plugins; YARD::Config.load_plugins end
parse(*args)
click to toggle source
An alias to {Parser::SourceParser}'s parsing method
@example Parse a glob of files
YARD.parse('lib /*.rb')
@see YARD::Parser::SourceParser.parse
# File lib/yard.rb, line 18 def self.parse(*args) Parser::SourceParser.parse(*args) end
parse_string(*args)
click to toggle source
An alias to {Parser::SourceParser}'s parsing method
@example Parse a string of input
YARD.parse_string('class Foo; end')
@see YARD::Parser::SourceParser.parse_string
# File lib/yard.rb, line 25 def self.parse_string(*args) Parser::SourceParser.parse_string(*args) end
ruby18?()
click to toggle source
@return [Boolean] whether YARD is being run in Ruby 1.8 mode
# File lib/yard.rb, line 45 def self.ruby18?; !ruby19? end
ruby19?()
click to toggle source
@return [Boolean] whether YARD is being run in Ruby 1.9 mode
# File lib/yard.rb, line 48 def self.ruby19?; @ruby19 ||= (RUBY_VERSION >= "1.9.1") end
ruby2?()
click to toggle source
@return [Boolean] whether YARD is being run in Ruby 2.0
# File lib/yard.rb, line 51 def self.ruby2?; @ruby2 ||= (RUBY_VERSION >= '2.0.0') end
windows?()
click to toggle source
@return [Boolean] whether YARD is being run inside of Windows
# File lib/yard.rb, line 32 def self.windows? return @windows if defined? @windows require 'rbconfig' if ::RbConfig::CONFIG['host_os'] =~ /mingw|win32|cygwin/ @windows = true else @windows = false end ensure @windows ||= false end