Class: Nem::Model::Timer

Inherits:
Object
  • Object
show all
Includes:
Nem::Mixin::Assignable
Defined in:
lib/nem/model/timer.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Methods included from Nem::Mixin::Assignable

#initialize

Instance Attribute Details

#average_operation_timeObject (readonly)

Returns the value of attribute average_operation_time.



6
7
8
# File 'lib/nem/model/timer.rb', line 6

def average_operation_time
  @average_operation_time
end

#executionsObject (readonly)

Returns the value of attribute executions.



6
7
8
# File 'lib/nem/model/timer.rb', line 6

def executions
  @executions
end

#failuresObject (readonly)

Returns the value of attribute failures.



6
7
8
# File 'lib/nem/model/timer.rb', line 6

def failures
  @failures
end

#is_executingObject (readonly)

Returns the value of attribute is_executing.



6
7
8
# File 'lib/nem/model/timer.rb', line 6

def is_executing
  @is_executing
end

#last_delay_timeObject (readonly)

Returns the value of attribute last_delay_time.



6
7
8
# File 'lib/nem/model/timer.rb', line 6

def last_delay_time
  @last_delay_time
end

#last_operation_start_timeObject (readonly)

Returns the value of attribute last_operation_start_time.



6
7
8
# File 'lib/nem/model/timer.rb', line 6

def last_operation_start_time
  @last_operation_start_time
end

#nameObject (readonly)

Returns the value of attribute name.



6
7
8
# File 'lib/nem/model/timer.rb', line 6

def name
  @name
end

#operation_timeObject (readonly)

Returns the value of attribute operation_time.



6
7
8
# File 'lib/nem/model/timer.rb', line 6

def operation_time
  @operation_time
end

#successesObject (readonly)

Returns the value of attribute successes.



6
7
8
# File 'lib/nem/model/timer.rb', line 6

def successes
  @successes
end

Class Method Details

.new_from_timer(hash) ⇒ Object



16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/nem/model/timer.rb', line 16

def self.new_from_timer(hash)
  new(
    last_delay_time: hash[:'last-delay-time'],
    executions: hash[:executions],
    failures: hash[:failures],
    successes: hash[:successes],
    last_operation_start_time: hash[:'last-operation-start-time'],
    is_executing: hash[:'is-executing'],
    name: hash[:name],
    average_operation_time: hash[:'average-operation-time'],
    operation_time: hash[:'operation-time']
  )
end