class Mio::Model::WaitGroovyScript
Constants
- MIN_POLLING_PERIOD
- MIN_TIMEOUT_PERIOD
Public Instance Methods
config_hash()
click to toggle source
# File lib/mio/model/wait_groovy_script.rb, line 32 def config_hash {'script_type': { script: @args.script }, imports: { 'jar-url': @args.jars.map{|jar| {value: jar, isExpression: false}}, import: @args.imports.map{|import| {value: import, isExpression: false}} }, 'timeout': @args.timeout, 'polling-time-period': @args.pollingTimePeriodMs, "requires-lock": @args.requiresLock } end
create_hash()
click to toggle source
# File lib/mio/model/wait_groovy_script.rb, line 22 def create_hash plugin = 'tv.nativ.mio.plugins.actions.wait.ScriptedWaitCommand' {name: @args.name, pluginClass: plugin, type: 'script', visibilityIds: @args.visibility, runRuleExpression: '' } end
validate()
click to toggle source
Calls superclass method
Mio::Model#validate
# File lib/mio/model/wait_groovy_script.rb, line 58 def validate super validate_timeout validate_polling_time_period true end
Also aliased as: valid?
validate_polling_time_period()
click to toggle source
# File lib/mio/model/wait_groovy_script.rb, line 52 def validate_polling_time_period unless @args.pollingTimePeriodMs >= MIN_POLLING_PERIOD raise Mio::Model::ObjectVariableInvalid, "Polling period [#{@args.pollingTimePeriodMs}] must be greater or equal to [#{MIN_POLLING_PERIOD}]" end end
validate_timeout()
click to toggle source
# File lib/mio/model/wait_groovy_script.rb, line 46 def validate_timeout unless @args.timeout >= MIN_TIMEOUT_PERIOD raise Mio::Model::ObjectVariableInvalid, "Timeout period [#{@args.pollingTimePeriodMs}] must be greater or equal to [#{MIN_TIMEOUT_PERIOD}]" end end