Module: PostBodyHack

Defined in:
lib/weibo/oauth_hack.rb

Constant Summary collapse

@@parameters =
nil

Class Method Summary collapse

Class Method Details

.apply_hack(params = {}, &block) ⇒ Object



24
25
26
27
28
29
# File 'lib/weibo/oauth_hack.rb', line 24

def self.apply_hack(params={}, &block)
  self.parameters = params.stringify_keys
  rv = yield
  self.parameters = {}
  rv
end

.parametersObject



20
21
22
# File 'lib/weibo/oauth_hack.rb', line 20

def self.parameters
  @@parameters
end

.parameters=(val) ⇒ Object



16
17
18
# File 'lib/weibo/oauth_hack.rb', line 16

def self.parameters=(val)
  @@parameters = val
end