Class: Sass::Callable

Inherits:
Struct
  • Object
show all
Defined in:
lib/sass/engine.rb

Overview

A Sass mixin or function.

name: String : The name of the mixin/function.

args: Array<(Script::Tree::Node, Script::Tree::Node)> : The arguments for the mixin/function. Each element is a tuple containing the variable node of the argument and the parse tree for the default value of the argument.

splat: Script::Tree::Node? : The variable node of the splat argument for this callable, or null.

environment: Environment : The environment in which the mixin/function was defined. This is captured so that the mixin/function can have access to local variables defined in its scope.

tree: Array<Tree::Node> : The parse tree for the mixin/function.

has_content: Boolean : Whether the callable accepts a content block.

type: String : The user-friendly name of the type of the callable.

Instance Attribute Summary collapse

Instance Attribute Details

#argsObject

Returns the value of attribute args

Returns:

  • (Object)

    the current value of args



80
81
82
# File 'lib/sass/engine.rb', line 80

def args
  @args
end

#environmentObject

Returns the value of attribute environment

Returns:

  • (Object)

    the current value of environment



80
81
82
# File 'lib/sass/engine.rb', line 80

def environment
  @environment
end

#has_contentObject

Returns the value of attribute has_content

Returns:

  • (Object)

    the current value of has_content



80
81
82
# File 'lib/sass/engine.rb', line 80

def has_content
  @has_content
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



80
81
82
# File 'lib/sass/engine.rb', line 80

def name
  @name
end

#splatObject

Returns the value of attribute splat

Returns:

  • (Object)

    the current value of splat



80
81
82
# File 'lib/sass/engine.rb', line 80

def splat
  @splat
end

#treeObject

Returns the value of attribute tree

Returns:

  • (Object)

    the current value of tree



80
81
82
# File 'lib/sass/engine.rb', line 80

def tree
  @tree
end

#typeObject

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



80
81
82
# File 'lib/sass/engine.rb', line 80

def type
  @type
end