Class: Smash::CloudPowers::Synapse::Broadcast::Channel
- Inherits:
-
Struct
- Object
- Struct
- Smash::CloudPowers::Synapse::Broadcast::Channel
- Includes:
- Zenv
- Defined in:
- lib/cloud_powers/synapse/broadcast/broadcast.rb
Overview
A simple Struct to bind the name with the arn of the topic
Instance Attribute Summary collapse
-
#set_arn ⇒ Object
Returns the value of attribute set_arn.
-
#set_endpoint ⇒ Object
Returns the value of attribute set_endpoint.
-
#set_name ⇒ Object
Returns the value of attribute set_name.
Instance Method Summary collapse
-
#arn ⇒ Object
Prefers the given arn but it can make a best guess if none is given.
-
#name ⇒ Object
Prefers the given name but it can parse the arn to find one.
Methods included from Zenv
#env_vars, #file_tree_search, #i_vars, #project_root, #project_root=, #system_vars, #zfind
Methods included from Helper
#attr_map!, #called_from, #create_logger, #errors, #format_error_message, #log_file, #logger, #smart_retry, #task_path, #task_require_path, #to_camel, #to_i_var, #to_pascal, #to_ruby_file_name, #to_snake, #update_message_body, #valid_json?
Instance Attribute Details
#set_arn ⇒ Object
Returns the value of attribute set_arn
10 11 12 |
# File 'lib/cloud_powers/synapse/broadcast/broadcast.rb', line 10 def set_arn @set_arn end |
#set_endpoint ⇒ Object
Returns the value of attribute set_endpoint
10 11 12 |
# File 'lib/cloud_powers/synapse/broadcast/broadcast.rb', line 10 def set_endpoint @set_endpoint end |
#set_name ⇒ Object
Returns the value of attribute set_name
10 11 12 |
# File 'lib/cloud_powers/synapse/broadcast/broadcast.rb', line 10 def set_name @set_name end |
Instance Method Details
#arn ⇒ Object
Prefers the given arn but it can make a best guess if none is given
14 15 16 |
# File 'lib/cloud_powers/synapse/broadcast/broadcast.rb', line 14 def arn set_arn || "arn:aws:sns:#{zfind(:region)}:#{zfind(:accound_number)}:#{set_name}" end |
#name ⇒ Object
Prefers the given name but it can parse the arn to find one
19 20 21 |
# File 'lib/cloud_powers/synapse/broadcast/broadcast.rb', line 19 def name set_name || set_arn.split(':').last end |