Class: Sass::Environment

Inherits:
Object
  • Object
show all
Defined in:
lib/sass-prof.rb

Instance Method Summary collapse

Instance Method Details

#__set_global_varObject

Global variable declare



150
# File 'lib/sass-prof.rb', line 150

alias_method :__set_global_var, :set_global_var

#__set_local_varObject

Local variable declare



170
# File 'lib/sass-prof.rb', line 170

alias_method :__set_local_var, :set_local_var

#__set_varObject

Variable declare



130
# File 'lib/sass-prof.rb', line 130

alias_method :__set_var, :set_var

#set_global_var(name, value) ⇒ Object



152
153
154
155
156
157
158
159
160
161
162
163
164
165
# File 'lib/sass-prof.rb', line 152

def set_global_var(name, value)
  return __set_global_var name,
    value if ::SassProf::Config.ignore.include? :var

  prof = ::SassProf::VarProfiler.new(name.dup, :var, value.dup,
    self)
  prof.start

  value = __set_global_var name, value

  prof.stop

  value
end

#set_local_var(name, value) ⇒ Object



172
173
174
175
176
177
178
179
180
181
182
183
184
185
# File 'lib/sass-prof.rb', line 172

def set_local_var(name, value)
  return __set_local_var name,
    value if ::SassProf::Config.ignore.include? :var

  prof = ::SassProf::VarProfiler.new(name.dup, :var, value.dup,
    self)
  prof.start

  value = __set_local_var name, value

  prof.stop

  value
end

#set_var(name, value) ⇒ Object



132
133
134
135
136
137
138
139
140
141
142
143
144
145
# File 'lib/sass-prof.rb', line 132

def set_var(name, value)
  return __set_var name,
    value if ::SassProf::Config.ignore.include? :var

  prof = ::SassProf::VarProfiler.new(name.dup, :var, value.dup,
    self)
  prof.start

  value = __set_var name, value

  prof.stop

  value
end