Class: NeetoDeploy::CLI::Redis::Set
- Defined in:
- lib/neeto_deploy/cli/redis/set.rb
Constant Summary
Constants included from Constants
Constants::AVAILABLE_REDIS_CONFIGS_TO_EDIT, Constants::NEETO_DEPLOY_CLI_API_ADDONS_REDIS_URL
Instance Attribute Summary collapse
-
#addon_name ⇒ Object
readonly
Returns the value of attribute addon_name.
-
#key ⇒ Object
readonly
Returns the value of attribute key.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(options) ⇒ Set
constructor
A new instance of Set.
- #run ⇒ Object
Methods included from Session
#common_body, require_app_option, #send_delete_request, #send_get_request, #send_patch_request, #send_post_request
Methods included from Constants
#available_configs_to_edit, #console_session_base_url, #redis_addon_url
Methods inherited from Base
Constructor Details
#initialize(options) ⇒ Set
Returns a new instance of Set.
17 18 19 20 21 22 |
# File 'lib/neeto_deploy/cli/redis/set.rb', line 17 def initialize() super() @addon_name = [:addon] @key = [:key] @value = [:value] end |
Instance Attribute Details
#addon_name ⇒ Object (readonly)
Returns the value of attribute addon_name.
15 16 17 |
# File 'lib/neeto_deploy/cli/redis/set.rb', line 15 def addon_name @addon_name end |
#key ⇒ Object (readonly)
Returns the value of attribute key.
15 16 17 |
# File 'lib/neeto_deploy/cli/redis/set.rb', line 15 def key @key end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
15 16 17 |
# File 'lib/neeto_deploy/cli/redis/set.rb', line 15 def value @value end |
Instance Method Details
#run ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/neeto_deploy/cli/redis/set.rb', line 24 def run unless valid_config? ui.error("Could not set cofig \"#{key}\". Please refer manageable redis configs: #{AVAILABLE_REDIS_CONFIGS_TO_EDIT}") return end ui.execute_with_loading("Setting config...") do send_request end print_output end |