Skip to content

Commit

Permalink
added parenthesis for calls to respond_to?
Browse files Browse the repository at this point in the history
  • Loading branch information
jameswnl committed Apr 10, 2017
1 parent 29a1f7a commit 7359776
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module ManageIQ::Providers::AnsibleTower::Shared::AutomationManager::TowerApi

module ClassMethods
def create_in_provider(manager_id, params)
params = provider_params(params) if respond_to? :provider_params
params = provider_params(params) if respond_to?(:provider_params)
manager = ExtManagementSystem.find(manager_id)
tower_object = provider_collection(manager).create!(params)

Expand All @@ -23,7 +23,7 @@ def create_in_provider_queue(manager_id, params)

private
def notify(op, manager_id, params, success)
params = hide_secrets(params) if respond_to? :hide_secrets
params = hide_secrets(params) if respond_to?(:hide_secrets)
Notification.create(
:type => success ? :tower_op_success : :tower_op_failure,
:options => {
Expand Down Expand Up @@ -62,7 +62,7 @@ def queue(zone, instance_id, method_name, args, action)

def update_in_provider(params)
params.delete(:task_id) # in case this is being called through update_in_provider_queue which will stick in a :task_id
params = self.class.provider_params(params) if self.class.respond_to? :provider_params
params = self.class.provider_params(params) if self.class.respond_to?(:provider_params)
with_provider_object do |provider_object|
provider_object.update_attributes!(params)
end
Expand Down

0 comments on commit 7359776

Please sign in to comment.