Results for: "fnmatch"

The index to insert activated gem paths into the $LOAD_PATH. The activated gem’s paths are inserted before site lib directory by default.

Add a list of paths to the $LOAD_PATH at the proper place.

No documentation available

Default spec directory path to be used if an alternate value is not specified in the environment

Return the value that should be dumped for the command_line option.

The iterator version of the strongly_connected_components method. obj.each_strongly_connected_component is similar to obj.strongly_connected_components.each, but modification of obj during the iteration may lead to unexpected results.

each_strongly_connected_component returns nil.

class G
  include TSort
  def initialize(g)
    @g = g
  end
  def tsort_each_child(n, &b) @g[n].each(&b) end
  def tsort_each_node(&b) @g.each_key(&b) end
end

graph = G.new({1=>[2, 3], 2=>[4], 3=>[2, 4], 4=>[]})
graph.each_strongly_connected_component {|scc| p scc }
#=> [4]
#   [2]
#   [3]
#   [1]

graph = G.new({1=>[2], 2=>[3, 4], 3=>[2], 4=>[]})
graph.each_strongly_connected_component {|scc| p scc }
#=> [4]
#   [2, 3]
#   [1]

The iterator version of the TSort.strongly_connected_components method.

The graph is represented by each_node and each_child. each_node should have call method which yields for each node in the graph. each_child should have call method which takes a node argument and yields for each child node.

g = {1=>[2, 3], 2=>[4], 3=>[2, 4], 4=>[]}
each_node = lambda {|&b| g.each_key(&b) }
each_child = lambda {|n, &b| g[n].each(&b) }
TSort.each_strongly_connected_component(each_node, each_child) {|scc| p scc }
#=> [4]
#   [2]
#   [3]
#   [1]

g = {1=>[2], 2=>[3, 4], 3=>[2], 4=>[]}
each_node = lambda {|&b| g.each_key(&b) }
each_child = lambda {|n, &b| g[n].each(&b) }
TSort.each_strongly_connected_component(each_node, each_child) {|scc| p scc }
#=> [4]
#   [2, 3]
#   [1]

Creates a State object from opts, which ought to be Hash to create a new State instance configured by opts, something else to create an unconfigured instance. If opts is a State object, it is just returned.

This integer returns the maximum level of data structure nesting in the generated JSON, max_nesting = 0 if no maximum is checked.

This sets the maximum level of data structure nesting in the generated JSON to the integer depth, max_nesting = 0 if no maximum should be checked.

Returns true, if circular data structures should be checked, otherwise returns false.

This method is deprecated and should not be used. This is a no-op.

Sets the curve parameters. generator must be an instance of EC::Point that is on the curve. order and cofactor are integers.

See the OpenSSL documentation for EC_GROUP_set_generator()

Negate the value of a numeric node. This is a special case where you have a negative sign on one line and then a number on the next line. In normal Ruby, this will always be a method call. The parser gem, however, marks this as a numeric literal. We have to massage the tree here to get it into the correct form.

The parser gem automatically converts rn to n, meaning our offsets need to be adjusted to always subtract 1 from the length.

Within the given block, track that we’re within a pattern.

Parse a float from the string representation.

Parse a rational from the string representation.

No documentation available
No documentation available
No documentation available
No documentation available

The current session cache mode.

Sets the SSL session cache mode. Bitwise-or together the desired SESSION_CACHE_* constants to set. See SSL_CTX_set_session_cache_mode(3) for details.

Returns the current session cache size. Zero is used to represent an unlimited cache size.

Search took: 4ms  ·  Total Results: 1890