Sha256: 4e0bd1fcc32132e3e0db1281c708c81f6035aac5c66e27237e78086ae89ab44c
Contents?: true
Size: 622 Bytes
Versions: 1
Compression:
Stored size: 622 Bytes
Contents
module Ro class Root < ::String def initialize(root) super(Util.realpath(root.to_s)) ensure raise ArgumentError.new("root=#{ root.inspect }") if root.nil? raise ArgumentError.new("root=#{ root.inpsect }") unless test(?d, root) end def root self end def nodes Node::List.new(root) do |list| node_directories do |path| list.load(path) end end end def directories(&block) Dir.glob(File.join(root, '*/'), &block) end def node_directories(&block) Dir.glob(File.join(root, '*/*/'), &block) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ro-1.0.0 | lib/ro/root.rb |