Class: MonkeyTimedAction

Inherits:
MonkeyAction show all
Defined in:
lib/MonkeyAction/monkey_timed_action.rb

Overview

Monkey action: one that is timed based on an Integer.

Instance Attribute Summary collapse

Attributes inherited from MonkeyAction

#monkey

Attributes inherited from Action

#action_time, #value, #weight

Instance Method Summary collapse

Methods inherited from Action

#action_completed=, #action_completed?

Constructor Details

#initialize(monkey, value, weight) ⇒ MonkeyTimedAction

Returns a new instance of MonkeyTimedAction.



9
10
11
12
13
14
15
16
17
# File 'lib/MonkeyAction/monkey_timed_action.rb', line 9

def initialize(monkey, value, weight)
  super monkey, value, weight

  @action_time_of_completion = nil

  validate

  self
end

Instance Attribute Details

#action_time_of_completionObject

Returns the value of attribute action_time_of_completion.



7
8
9
# File 'lib/MonkeyAction/monkey_timed_action.rb', line 7

def action_time_of_completion
  @action_time_of_completion
end