Class: SassProf::VarProfiler

Inherits:
Profiler show all
Defined in:
lib/sass-prof/var_profiler.rb

Constant Summary

Constants inherited from Profiler

Profiler::PERFORMABLE_ACTIONS

Instance Method Summary collapse

Methods inherited from Profiler

#start, #stop

Constructor Details

#initialize(subject, action, args = nil, env = nil) ⇒ VarProfiler

Returns a new instance of VarProfiler.



4
5
6
# File 'lib/sass-prof/var_profiler.rb', line 4

def initialize(subject, action, args = nil, env = nil)
  super subject, action, args, env
end

Instance Method Details

#argsObject



12
13
14
15
16
# File 'lib/sass-prof/var_profiler.rb', line 12

def args
  return nil if @args.nil?

  @args.inspect
end

#nameObject



8
9
10
# File 'lib/sass-prof/var_profiler.rb', line 8

def name
  @subject
end

#signatureObject



18
19
20
21
# File 'lib/sass-prof/var_profiler.rb', line 18

def signature
  "#{Formatter.colorize("$#{name}", :blue)} = "\
  "#{Formatter.colorize(args, :purple)}"
end