Sha256: 6969dce8f95d45701dd0db034477d1047da1ee51a1c684cd02e4ca3e1d7ae677

Contents?: true

Size: 711 Bytes

Versions: 2

Compression:

Stored size: 711 Bytes

Contents

module Sass
  module Tree
    class Node
      unless method_defined?(:visit_depth_first)
        def visit_depth_first(visitor)
          visitor.visit(self)
          visitor.down(self) if children.any? and visitor.respond_to?(:down)
          if is_a?(ImportNode) && visitor.import?(self)
            root = Sass::Engine.for_file(import, @options).to_tree
            imported_children = root.children
          end

          (imported_children || children).each do |child|
            break if visitor.respond_to?(:stop?) && visitor.stop?
            child.visit_depth_first(visitor)
          end
          visitor.up(self) if children.any?
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
compass-sourcemaps-0.12.3.sourcemaps.a4836f1 lib/compass/sass_extensions/monkey_patches/traversal.rb
compass-sourcemaps-0.12.2.sourcemaps.57a186c lib/compass/sass_extensions/monkey_patches/traversal.rb