Exception: HazardousError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/cosmos/top_level.rb

Overview

If a hazardous command is sent through the Cosmos::Api this error is raised. Cosmos::Script rescues the error and prompts the user to continue.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#cmd_nameObject

Returns the value of attribute cmd_name.



37
38
39
# File 'lib/cosmos/top_level.rb', line 37

def cmd_name
  @cmd_name
end

#cmd_paramsObject

Returns the value of attribute cmd_params.



38
39
40
# File 'lib/cosmos/top_level.rb', line 38

def cmd_params
  @cmd_params
end

#hazardous_descriptionObject

Returns the value of attribute hazardous_description.



39
40
41
# File 'lib/cosmos/top_level.rb', line 39

def hazardous_description
  @hazardous_description
end

#target_nameObject

Returns the value of attribute target_name.



36
37
38
# File 'lib/cosmos/top_level.rb', line 36

def target_name
  @target_name
end

Instance Method Details

#to_sObject



41
42
43
# File 'lib/cosmos/top_level.rb', line 41

def to_s
  "#{target_name} #{cmd_name} with #{cmd_params} is Hazardous due to #{hazardous_description}"
end