Sha256: 07bb540e8789dd8ca2d642474b049989f3dd4f229c2aa9b0619f3d9152e4bff3

Contents?: true

Size: 708 Bytes

Versions: 99

Compression:

Stored size: 708 Bytes

Contents

module ActionWebService # :nodoc:
  module Client # :nodoc:
    class ClientError < StandardError # :nodoc:
    end

    class Base # :nodoc:
      def initialize(api, endpoint_uri)
        @api = api
        @endpoint_uri = endpoint_uri
      end

      def method_missing(name, *args) # :nodoc:
        call_name = method_name(name)
        return super(name, *args) if call_name.nil?
        self.perform_invocation(call_name, args)
      end

      private
        def method_name(name)
          if @api.has_api_method?(name.to_sym)
            name.to_s
          elsif @api.has_public_api_method?(name.to_s)
            @api.api_method_name(name.to_s).to_s
          end
        end
    end
  end
end

Version data entries

99 entries across 99 versions & 29 rubygems

Version Path
radiant-0.6.1 vendor/rails/actionwebservice/lib/action_web_service/client/base.rb
radiant-0.6.0 vendor/rails/actionwebservice/lib/action_web_service/client/base.rb
radiant-0.6.2 vendor/rails/actionwebservice/lib/action_web_service/client/base.rb
radiant-0.6.3 vendor/rails/actionwebservice/lib/action_web_service/client/base.rb
radiant-0.6.4 vendor/rails/actionwebservice/lib/action_web_service/client/base.rb
rq-3.3.0 rails/vendor/rails/actionwebservice/lib/action_web_service/client/base.rb
rq-3.4.0 rails/vendor/rails/actionwebservice/lib/action_web_service/client/base.rb
typo-5.0.1 vendor/actionwebservice/lib/action_web_service/client/base.rb
typo-5.0.2 vendor/actionwebservice/lib/action_web_service/client/base.rb
typo-5.0.3.98.1 vendor/actionwebservice/lib/action_web_service/client/base.rb
typo-5.0 vendor/actionwebservice/lib/action_web_service/client/base.rb
typo-5.0.3.98 vendor/actionwebservice/lib/action_web_service/client/base.rb
typo-5.1.2 vendor/actionwebservice/lib/action_web_service/client/base.rb
typo-5.1.1 vendor/actionwebservice/lib/action_web_service/client/base.rb
typo-5.1.3 vendor/actionwebservice/lib/action_web_service/client/base.rb
typo-5.1 vendor/actionwebservice/lib/action_web_service/client/base.rb
typo-5.1.98 vendor/actionwebservice/lib/action_web_service/client/base.rb
typo-5.2 vendor/actionwebservice/lib/action_web_service/client/base.rb
typo-5.3 vendor/actionwebservice/lib/action_web_service/client/base.rb