Escapes all possible entities
Unescapes all possible entities
Content: [ String
text ]
Listen arguments:
Listen to Symbol events on Array elements
Symbol
, Block
Listen to Symbol events
Array
, Listener
Listen to all events on Array elements
Array
, Block
Listen to :start_element events on Array elements
Listener
Listen to All events
Symbol
can be one of: :start_element, :end_element, :start_prefix_mapping, :end_prefix_mapping, :characters, :processing_instruction, :doctype, :attlistdecl, :elementdecl, :entitydecl, :notationdecl, :cdata, :xmldecl, :comment
There is an additional symbol that can be listened for: :progress. This will be called for every event generated, passing in the current stream position.
Array
contains regular expressions or strings which will be matched against fully qualified element names.
Listener must implement the methods in SAX2Listener
Block will be passed the same arguments as a SAX2Listener
method would be, where the method name is the same as the matched Symbol
. See the SAX2Listener
for more information.
Filters the supplied nodeset on the predicate(s)
| EqualityExpr
(‘=’ | ‘!=’) RelationalExpr
| RelationalExpr
Sets url
as a source for gems for this dependency API. RubyGems uses the default configured sources if no source was given. If a source is set only that source is used.
This method differs in behavior from Bundler:
The :gemcutter
, # :rubygems
and :rubyforge
sources are not supported as they are deprecated in bundler.
The prepend:
option is not supported. If you wish to order sources then list them in your preferred order.
The source for this specification
Authenticates a req
and returns a 401 Unauthorized using res
if the authentication was not correct.
Authenticates a req
and returns a 401 Unauthorized using res
if the authentication was not correct.
Cancels the timeout handler id
Returns the line number of this frame.
For example, using caller_locations.rb
from Thread::Backtrace::Location
loc = c(0..1).first loc.lineno #=> 2