Sha256: ad419dd7b2b46f67221b53a43a085bd36b70d0bb3270ad5f8c461c392f63a970
Contents?: true
Size: 542 Bytes
Versions: 2
Compression:
Stored size: 542 Bytes
Contents
# frozen_string_literal: true require_relative 'monkey_action' require 'MonkeyEngine/exceptions' # Monkey action: wake (as in from sleep) # The monkey has awakened from sleep. class MonkeyActionWake < MonkeyAction WEIGHT = 2.0 VALID_VALUES = [true].freeze def initialize(monkey) super monkey, true, WEIGHT validate end protected def validate super raise MonkeyEngine::Exceptions::InvalidArgumentValueException, "Value '#{value}' is not a valid value" \ unless VALID_VALUES.include?(@value) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
MonkeyEngine-2.0.2 | lib/MonkeyAction/monkey_action_wake.rb |
MonkeyEngine-2.0.1 | lib/MonkeyAction/monkey_action_wake.rb |