Define the public API using YARD/semver
This commit is contained in:
parent
039edee9ec
commit
df96b3d3bb
|
@ -3,7 +3,6 @@
|
||||||
-M kramdown
|
-M kramdown
|
||||||
-o yardoc
|
-o yardoc
|
||||||
-r ./README.md
|
-r ./README.md
|
||||||
--private
|
|
||||||
--protected
|
--protected
|
||||||
--asset ./doc/css/common.css:css/common.css
|
--asset ./doc/css/common.css:css/common.css
|
||||||
--verbose
|
--verbose
|
||||||
|
|
|
@ -16,6 +16,10 @@ From [Wikipedia][oga-wikipedia]:
|
||||||
> power saws. One person stood on a raised platform, with the board below him,
|
> power saws. One person stood on a raised platform, with the board below him,
|
||||||
> and the other person stood underneath them.
|
> and the other person stood underneath them.
|
||||||
|
|
||||||
|
Oga uses [Semantic Versioning 2.0][semver] as its versioning scheme. All
|
||||||
|
classes, modules and methods are part of the public API _unless_ they are
|
||||||
|
declared as private using Ruby's `private` keyword or YARD's `@api private` tag.
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
Parsing a simple string of XML:
|
Parsing a simple string of XML:
|
||||||
|
@ -303,3 +307,4 @@ in the root directory of this repository.
|
||||||
[oga-wikipedia]: https://en.wikipedia.org/wiki/Japanese_saw#Other_Japanese_saws
|
[oga-wikipedia]: https://en.wikipedia.org/wiki/Japanese_saw#Other_Japanese_saws
|
||||||
[ox]: https://github.com/ohler55/ox
|
[ox]: https://github.com/ohler55/ox
|
||||||
[doc-website]: http://code.yorickpeterse.com/oga/latest/
|
[doc-website]: http://code.yorickpeterse.com/oga/latest/
|
||||||
|
[semver]: http://semver.org/spec/v2.0.0.html
|
||||||
|
|
|
@ -16,6 +16,8 @@ module Oga
|
||||||
# multiple threads. However, no global state is used so you can use separate
|
# multiple threads. However, no global state is used so you can use separate
|
||||||
# instances in threads just fine.
|
# instances in threads just fine.
|
||||||
#
|
#
|
||||||
|
# @api private
|
||||||
|
#
|
||||||
class Lexer
|
class Lexer
|
||||||
%% write data;
|
%% write data;
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,8 @@
|
||||||
# Similar to {Oga::XPath::Parser} this parser only takes String instances as
|
# Similar to {Oga::XPath::Parser} this parser only takes String instances as
|
||||||
# input.
|
# input.
|
||||||
#
|
#
|
||||||
|
# @api private
|
||||||
|
#
|
||||||
}
|
}
|
||||||
|
|
||||||
%name Oga::CSS::Parser;
|
%name Oga::CSS::Parser;
|
||||||
|
|
|
@ -21,6 +21,8 @@ module Oga
|
||||||
#
|
#
|
||||||
# cache.keys # => [:b, :c, :d]
|
# cache.keys # => [:b, :c, :d]
|
||||||
#
|
#
|
||||||
|
# @api private
|
||||||
|
#
|
||||||
class LRU
|
class LRU
|
||||||
##
|
##
|
||||||
# @param [Fixnum] maximum
|
# @param [Fixnum] maximum
|
||||||
|
|
|
@ -3,6 +3,8 @@ module Oga
|
||||||
# Class for storing (HTML) element names in a set and automatically adding
|
# Class for storing (HTML) element names in a set and automatically adding
|
||||||
# their uppercase equivalents.
|
# their uppercase equivalents.
|
||||||
#
|
#
|
||||||
|
# @api private
|
||||||
|
#
|
||||||
class NodeNameSet < Set
|
class NodeNameSet < Set
|
||||||
##
|
##
|
||||||
# @param [Array] values
|
# @param [Array] values
|
||||||
|
|
|
@ -58,6 +58,8 @@ module Oga
|
||||||
#
|
#
|
||||||
# evaluator.evaluate('$number') # => 10
|
# evaluator.evaluate('$number') # => 10
|
||||||
#
|
#
|
||||||
|
# @api private
|
||||||
|
#
|
||||||
class Evaluator
|
class Evaluator
|
||||||
# Wildcard for node names/namespace prefixes.
|
# Wildcard for node names/namespace prefixes.
|
||||||
STAR = '*'
|
STAR = '*'
|
||||||
|
|
|
@ -32,6 +32,8 @@ module Oga
|
||||||
# use separate instances per thread as there is no global (= class level)
|
# use separate instances per thread as there is no global (= class level)
|
||||||
# shared state.
|
# shared state.
|
||||||
#
|
#
|
||||||
|
# @api private
|
||||||
|
#
|
||||||
class Lexer
|
class Lexer
|
||||||
%% write data;
|
%% write data;
|
||||||
|
|
||||||
|
|
|
@ -6,6 +6,8 @@
|
||||||
#
|
#
|
||||||
# Unlike {Oga::XML::Parser} this parser only takes String instances as input.
|
# Unlike {Oga::XML::Parser} this parser only takes String instances as input.
|
||||||
#
|
#
|
||||||
|
# @api private
|
||||||
|
#
|
||||||
}
|
}
|
||||||
|
|
||||||
%name Oga::XPath::Parser;
|
%name Oga::XPath::Parser;
|
||||||
|
|
Loading…
Reference in New Issue