Sha256: 45ec9dc8da300b89f560b236fa06f90ef495ea8daaeaf654f81e4140946cad89

Contents?: true

Size: 625 Bytes

Versions: 3

Compression:

Stored size: 625 Bytes

Contents

require 'sass/tree/node'

module Sass::Tree
  # A dynamic node representing a Sass `@each` loop.
  #
  # @see Sass::Tree
  class EachNode < Node
    # The name of the loop variable.
    # @return [String]
    attr_reader :var

    # The parse tree for the list.
    # @param [Script::Node]
    attr_reader :list

    # @param var [String] The name of the loop variable
    # @param list [Script::Node] The parse tree for the list
    def initialize(var, list)
      @var = var
      @list = list
      super()
    end

    # Returns sub nodes that are not tree children.
    def subnodes
      Array(list)
    end

  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
sass-3.1.5 lib/sass/tree/each_node.rb
sass-3.1.4 lib/sass/tree/each_node.rb
sass-3.2.0.alpha.11 lib/sass/tree/each_node.rb