-
Notifications
You must be signed in to change notification settings - Fork 241
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #109 from mhenrixon/controller_specific_configuration
Per SOAP Service configuration
- Loading branch information
Showing
22 changed files
with
270 additions
and
150 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
module WashOut | ||
module Configurable | ||
extend ActiveSupport::Concern | ||
|
||
included do | ||
cattr_reader :soap_config | ||
class_variable_set :@@soap_config, WashOut::SoapConfig.new({}) | ||
end | ||
|
||
module ClassMethods | ||
|
||
def soap_config=(obj) | ||
|
||
unless obj.is_a?(Hash) | ||
raise "Value needs to be a Hash." | ||
end | ||
|
||
if class_variable_defined?(:@@soap_config) | ||
class_variable_get(:@@soap_config).configure obj | ||
else | ||
class_variable_set :@@soap_config, WashOut::SoapConfig.new(obj) | ||
end | ||
end | ||
end | ||
|
||
def soap_config=(obj) | ||
|
||
unless obj.is_a?(Hash) | ||
raise "Value needs to be a Hash." | ||
end | ||
|
||
class_eval do | ||
if class_variable_defined?(:@@soap_config) | ||
class_variable_get(:@@soap_config).configure obj | ||
else | ||
class_variable_set :@@soap_config, WashOut::SoapConfig.new(obj) | ||
end | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.