Reload groups from the database
Retrieve the list of members from group
Reload passwords from the database
Dispatches to a do_
method based on req
if such a method is available. (do_GET
for a GET request). Raises a MethodNotAllowed exception if the method is not implemented.
Registers a new timeout handler
Returns an array of two elements: the filename where the calling method is located, and the line number where it is defined.
Takes an optional argument i
, which specifies how many callers up the stack to look.
Examples:
require 'rss/utils' def foo p RSS::Utils.get_file_and_line_from_caller p RSS::Utils.get_file_and_line_from_caller(1) end def bar foo end def baz bar end baz # => ["test.rb", 5] # => ["test.rb", 9]
If i
is not given, or is the default value of 0, it attempts to figure out the correct value. This is useful when in combination with instance_eval. For example:
require 'rss/utils' def foo p RSS::Utils.get_file_and_line_from_caller(1) end def bar foo end instance_eval <<-RUBY, *RSS::Utils.get_file_and_line_from_caller def baz bar end RUBY baz # => ["test.rb", 8]
Like Enumerable#filter_map
, but chains operation to be lazy-evaluated.
(1..).lazy.filter_map { |i| i * 2 if i.even? }.first(5) #=> [4, 8, 12, 16, 20]
Like Enumerable#slice_after
, but chains operation to be lazy-evaluated.
Like Enumerable#map
, but chains operation to be lazy-evaluated.
(1..Float::INFINITY).lazy.map {|i| i**2 } #=> #<Enumerator::Lazy: #<Enumerator::Lazy: 1..Infinity>:map> (1..Float::INFINITY).lazy.map {|i| i**2 }.first(3) #=> [1, 4, 9]
Like Enumerable#map
, but chains operation to be lazy-evaluated.
(1..Float::INFINITY).lazy.map {|i| i**2 } #=> #<Enumerator::Lazy: #<Enumerator::Lazy: 1..Infinity>:map> (1..Float::INFINITY).lazy.map {|i| i**2 }.first(3) #=> [1, 4, 9]
Like Enumerable#select
, but chains operation to be lazy-evaluated.
Like Enumerable#reject
, but chains operation to be lazy-evaluated.
Like Enumerable#grep
, but chains operation to be lazy-evaluated.
Like Enumerable#grep_v
, but chains operation to be lazy-evaluated.
Like Enumerable#zip
, but chains operation to be lazy-evaluated. However, if a block is given to zip, values are enumerated immediately.
Like Enumerable#take
, but chains operation to be lazy-evaluated.