Sha256: 4aa3969aaf77e1ebf9f49757ece0d4ea89cf57482c373fda82fa68a52a93f1c5

Contents?: true

Size: 809 Bytes

Versions: 3

Compression:

Stored size: 809 Bytes

Contents

module Sass
  module Tree
    # A dynamic node representing a mixin definition.
    #
    # @see Sass::Tree
    class MixinDefNode < Node
      # The mixin name.
      # @return [String]
      attr_reader :name

      # The arguments for the mixin.
      # Each element is a tuple containing the variable for argument
      # and the parse tree for the default value of the argument.
      #
      # @return [Array<(Script::Node, Script::Node)>]
      attr_reader :args

      # @param name [String] The mixin name
      # @param args [Array<(Script::Node, Script::Node)>] See \{#args}
      def initialize(name, args)
        @name = name
        @args = args
        super()
      end

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

Version data entries

3 entries across 3 versions & 1 rubygems

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