Sha256: e978df021f199e0b240e5316ffaf8e1cf6267051c5695a7e2fb8ac80e66db970

Contents?: true

Size: 296 Bytes

Versions: 8

Compression:

Stored size: 296 Bytes

Contents

require 'rmega/nodes/node'
require 'rmega/nodes/traversable'

module Rmega
  module Nodes
    class Trash < Node
      include Traversable

      def empty!
        children.each do |node|
          node.delete if node.respond_to?(:delete)
        end

        empty?
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
rmega-0.1.7 lib/rmega/nodes/trash.rb
rmega-0.1.6 lib/rmega/nodes/trash.rb
rmega-0.1.5 lib/rmega/nodes/trash.rb
rmega-0.1.4 lib/rmega/nodes/trash.rb
rmega-0.1.3 lib/rmega/nodes/trash.rb
rmega-0.1.2 lib/rmega/nodes/trash.rb
rmega-0.1.1 lib/rmega/nodes/trash.rb
rmega-0.1.0 lib/rmega/nodes/trash.rb