Sha256: 110ab2b1c5c2c01eb7098b4f42ed216f7cd48c3c55753fd97aac3ae6ad43a69d

Contents?: true

Size: 1.01 KB

Versions: 14

Compression:

Stored size: 1.01 KB

Contents

require 'sass/tree/node'

module Sass::Tree
  # A static node representing a mixin include.
  # When in a static tree, the sole purpose is to wrap exceptions
  # to add the mixin to the backtrace.
  #
  # @see Sass::Tree
  class MixinNode < Node
    # The name of the mixin.
    # @return [String]
    attr_reader :name

    # The arguments to the mixin.
    # @return [Array<Script::Node>]
    attr_reader :args

    # A hash from keyword argument names to values.
    # @return [{String => Script::Node}]
    attr_reader :keywords

    # @see Node#options=
    def options=(opts)
      super
      @args.each {|a| a.context = :equals} if opts[:sass2]
      @keywords.each {|k, v| v.context = :equals} if opts[:sass2]
    end

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

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
sass-3.1.0.alpha.221 lib/sass/tree/mixin_node.rb
sass-3.1.0.alpha.218 lib/sass/tree/mixin_node.rb
sass-3.1.0.alpha.217 lib/sass/tree/mixin_node.rb
sass-3.1.0.alpha.216 lib/sass/tree/mixin_node.rb
sass-3.1.0.alpha.212 lib/sass/tree/mixin_node.rb
sass-3.1.0.alpha.214 lib/sass/tree/mixin_node.rb
sass-3.1.0.alpha.210 lib/sass/tree/mixin_node.rb
sass-3.1.0.alpha.206 lib/sass/tree/mixin_node.rb
sass-3.1.0.alpha.205 lib/sass/tree/mixin_node.rb
sass-3.1.0.alpha.204 lib/sass/tree/mixin_node.rb
sass-3.1.0.alpha.200 lib/sass/tree/mixin_node.rb
sass-3.1.0.alpha.51 lib/sass/tree/mixin_node.rb
sass-3.1.0.alpha.50 lib/sass/tree/mixin_node.rb
sass-3.1.0.alpha.49 lib/sass/tree/mixin_node.rb