Sha256: f8363aa78e90ac9e345c82c549420910e4efce635ac262f02a481b86812db008

Contents?: true

Size: 500 Bytes

Versions: 17

Compression:

Stored size: 500 Bytes

Contents

module Sass
  module Tree
    class VariableNode < Node
      def initialize(name, expr, guarded)
        @name = name
        @expr = expr
        @guarded = guarded
        super()
      end

      protected

      def _perform(environment)
        if @guarded && environment.var(@name).nil?
          environment.set_var(@name, @expr.perform(environment))
        elsif !@guarded
          environment.set_var(@name, @expr.perform(environment))
        end

        []
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 2 rubygems

Version Path
gohanlonllc-haml-2.1.0.20080513000000 lib/sass/tree/variable_node.rb
gohanlonllc-haml-2.1.0 lib/sass/tree/variable_node.rb
haml-edge-2.1.11 lib/sass/tree/variable_node.rb
haml-edge-2.1.12 lib/sass/tree/variable_node.rb
haml-edge-2.1.10 lib/sass/tree/variable_node.rb
haml-edge-2.1.15 lib/sass/tree/variable_node.rb
haml-edge-2.1.18 lib/sass/tree/variable_node.rb
haml-edge-2.1.19 lib/sass/tree/variable_node.rb
haml-edge-2.1.20 lib/sass/tree/variable_node.rb
haml-edge-2.1.17 lib/sass/tree/variable_node.rb
haml-edge-2.1.21 lib/sass/tree/variable_node.rb
haml-edge-2.1.13 lib/sass/tree/variable_node.rb
haml-edge-2.1.14 lib/sass/tree/variable_node.rb
haml-edge-2.1.16 lib/sass/tree/variable_node.rb
haml-edge-2.1.9 lib/sass/tree/variable_node.rb
haml-edge-2.1.8 lib/sass/tree/variable_node.rb
haml-edge-2.1.7 lib/sass/tree/variable_node.rb