Class: SDKComponent

Inherits:
Object
  • Object
show all
Defined in:
lib/sdk_component.rb

Direct Known Subclasses

GraphRequest, GraphResponse, PublisherSDK

Instance Method Summary collapse

Instance Method Details

#ensure_slash(s) ⇒ Object



3
4
5
6
7
8
9
10
11
12
# File 'lib/sdk_component.rb', line 3

def ensure_slash s
	s = s.to_s
	if s.empty?
		s = "" 
	elsif s[0]!='/'
		s = "/"+s
	else
		s
	end
end

#query_decode(strs) ⇒ Object



14
15
16
17
18
19
20
21
# File 'lib/sdk_component.rb', line 14

def query_decode strs
	_hash = {}
	for str in strs.split("&")
		s = str.split("=")
		_hash[s[0]]= s[1]
	end
	_hash
end