Class: Capistrano::Measure::Timer::Event

Inherits:
Struct
  • Object
show all
Defined in:
lib/capistrano/measure/timer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#actionObject

Returns the value of attribute action

Returns:

  • (Object)

    the current value of action



6
7
8
# File 'lib/capistrano/measure/timer.rb', line 6

def action
  @action
end

#elapsed_timeObject

Returns the value of attribute elapsed_time

Returns:

  • (Object)

    the current value of elapsed_time



6
7
8
# File 'lib/capistrano/measure/timer.rb', line 6

def elapsed_time
  @elapsed_time
end

#indentObject

Returns the value of attribute indent

Returns:

  • (Object)

    the current value of indent



6
7
8
# File 'lib/capistrano/measure/timer.rb', line 6

def indent
  @indent
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



6
7
8
# File 'lib/capistrano/measure/timer.rb', line 6

def name
  @name
end

#timeObject

Returns the value of attribute time

Returns:

  • (Object)

    the current value of time



6
7
8
# File 'lib/capistrano/measure/timer.rb', line 6

def time
  @time
end

Instance Method Details

#eq?(event) ⇒ Boolean

Returns:

  • (Boolean)


11
12
13
# File 'lib/capistrano/measure/timer.rb', line 11

def eq?(event)
  id == event.id
end

#idObject



7
8
9
# File 'lib/capistrano/measure/timer.rb', line 7

def id
  "#{name}_#{indent}".freeze
end

#start?Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/capistrano/measure/timer.rb', line 15

def start?
  action == :start
end