class WashoutBuilder::Type

class that is used to define the basic types and the basic exception classes that should be considered

Constants

BASIC_TYPES

the basic types that are considered when checking an object type

Public Class Methods

all_controller_classes() click to toggle source

returns all the controller classes that should override the “soap_action” method

@return [Array<Class>] returns all the controller classes that should override the “soap_action” method @api public

# File lib/washout_builder/type.rb, line 23
def self.all_controller_classes
  classes = []
  classes << WashOut::Rails::Controller::ClassMethods if defined?(WashOut::Rails::Controller::ClassMethods)
  classes << WashOut::SOAP::ClassMethods if defined?(WashOut::SOAP::ClassMethods)
  classes
end
all_fault_classes() click to toggle source

returns all the exception classes that should be considered to be detected

@return [Array<Class>] returns all the exception classes that should be considered to be detected @api public

# File lib/washout_builder/type.rb, line 11
def self.all_fault_classes
  classes = []
  classes << WashOut::SOAPError if defined?(WashOut::SOAPError)
  classes << WashOut::Dispatcher::SOAPError if defined?(WashOut::Dispatcher::SOAPError)
  classes << SOAPError if defined?(SOAPError)
  classes
end
all_soap_config_classes() click to toggle source

returns all the soap config classss that should be overriden to allow description of web service also besides namespace and endpoint

@return [Array<Class>] returns all the soap config classss that should be overriden to allow description of web service also besides namespace and endpoint @api public

# File lib/washout_builder/type.rb, line 50
def self.all_soap_config_classes
  classes = []
  classes << WashOut::SoapConfig if defined?(WashOut::SoapConfig)
  classes
end
ancestor_fault?(fault_class) click to toggle source

Checks if a exception class inherits from the basic ones @see all_fault_classes

@param [Class] fault_class the exception class that needs to be checks if has as ancestor one of the base classes @return [Boolean] Returns true if the class inherits from the basic classes or false otherwise @api public

# File lib/washout_builder/type.rb, line 62
def self.ancestor_fault?(fault_class)
  fault_class.ancestors.find { |fault| all_fault_classes.include?(fault) }.present?
end
base_param_class() click to toggle source

returns the base class that is used for parsing definitions of soap actions

@return [Class] returns the base class that is used for parsing definitions of soap actions @api public

# File lib/washout_builder/type.rb, line 34
def self.base_param_class
  defined?(WashOut::Param) ? WashOut::Param : nil
end
base_type_class() click to toggle source

returns the base class that is used for WashOut types

@return [Class] returns the base class that is used for WashOut types @api public

# File lib/washout_builder/type.rb, line 42
def self.base_type_class
  defined?(WashOut::Type) ? WashOut::Type : nil
end
valid_fault_class?(fault) click to toggle source

Checks if a exception class is valid, by checking if either is a basic exception class or has as ancerstor one ot the base classes

@param [Class] fault The exception class that needs to be checks if has as ancestor one of the base classes or is one of them @return [Boolean] Returns true if the class inherits from the basic classes or is one of them, otherwise false @api public

# File lib/washout_builder/type.rb, line 71
def self.valid_fault_class?(fault)
  fault.is_a?(Class) && (ancestor_fault?(fault) || all_fault_classes.include?(fault))
end