Sha256: 31c446e63686dedc98bbd6cbd85bcc1c74bc16b29a2a5f2b68548386a01b9203

Contents?: true

Size: 531 Bytes

Versions: 1

Compression:

Stored size: 531 Bytes

Contents

module Xmlsoccer

  module Manifest
  	

  	def get_available_methods
  	  self.client.operations.each do |method|
  	  	self.class.send(:define_method, method) do |options={}|
  	  	  response = self.client.call(method, message: options.merge("ApiKey" => self.api_key))
  	  	  response = response.hash[:envelope][:body]["#{method}_response".to_sym]["#{method}_result".to_sym][:xmlsoccer_com]
  	  	  raise response.to_s unless response.respond_to?(:each)
  	  	  response[response.keys.first]
  	  	end
  	  end
  	end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
xmlsoccer-0.1.0 lib/xmlsoccer/manifest.rb