<commit_before>Wash Out
========

Wash Out is a gem that greatly simplifies creation of SOAP service providers.

Installation
------------

In your Gemfile, add this line:

    gem 'wash_out'

Usage
-----

A SOAP endpoint in WashOut is simply a Rails controller which includes the module WashOut::SOAP. Each SOAP
action corresponds to a certain controller method; this mapping, as well as the argument definition, is defined
by [soap_action][] method. Check the method documentation for complete info; here, only a few examples will be
demonstrated.

  [soap_action]: http://rubydoc.info/gems/wash_out/0.2.1/WashOut/SOAP/ClassMethods#soap_action-instance_method

```ruby
# app/controllers/api_controller.rb
class ApiController < ApplicationController
  include WashOut::SOAP

  soap_action "integer_to_string",
              :args   => :integer,
              :return => :string
  def integer_to_string
    render :soap => params[:value].to_s
  end

  soap_action "concat",
              :args   => { :a => :string, :b => :string },
              :return => :string
  def concat
    render :soap => (params[:a] + params[:b])
  end

  soap_action "AddCircle",
              :args   => { :circle => { :center => { :x => :integer,
                                                     :y => :integer },<commit_msg>Fix a link in README.<commit_after>Wash Out
========

Wash Out is a gem that greatly simplifies creation of SOAP service providers.

Installation
------------

In your Gemfile, add this line:

    gem 'wash_out'

Usage
-----

A SOAP endpoint in WashOut is simply a Rails controller which includes the module WashOut::SOAP. Each SOAP
action corresponds to a certain controller method; this mapping, as well as the argument definition, is defined
by [soap_action][] method. Check the method documentation for complete info; here, only a few examples will be
demonstrated.

  [soap_action]: http://rubydoc.info/gems/wash_out/WashOut/SOAP/ClassMethods#soap_action-instance_method

```ruby
# app/controllers/api_controller.rb
class ApiController < ApplicationController
  include WashOut::SOAP

  soap_action "integer_to_string",
              :args   => :integer,
              :return => :string
  def integer_to_string
    render :soap => params[:value].to_s
  end

  soap_action "concat",
              :args   => { :a => :string, :b => :string },
              :return => :string
  def concat
    render :soap => (params[:a] + params[:b])
  end

  soap_action "AddCircle",
              :args   => { :circle => { :center => { :x => :integer,
                                                     :y => :integer },
{'fraction_non_alphanumeric': 0.11594202898550725, 'fraction_numerical': 0.0011441647597254005, 'mean_word_length': 2.689170182841069, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 29, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6754148', 'n_tokens_mistral': 758, 'n_tokens_neox': 725, 'n_words': 250}