Exception: HazardousError
- 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
-
#cmd_name ⇒ Object
Returns the value of attribute cmd_name.
-
#cmd_params ⇒ Object
Returns the value of attribute cmd_params.
-
#hazardous_description ⇒ Object
Returns the value of attribute hazardous_description.
-
#target_name ⇒ Object
Returns the value of attribute target_name.
Instance Method Summary collapse
Instance Attribute Details
#cmd_name ⇒ Object
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_params ⇒ Object
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_description ⇒ Object
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_name ⇒ Object
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_s ⇒ Object
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 |