Class: MotionWechat::Client

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

Instance Method Summary collapse

Constructor Details

#initialize(app_id = '') ⇒ Client

Returns a new instance of Client.



4
5
6
7
# File 'lib/motion_wechat/client.rb', line 4

def initialize(app_id = '')
  @app_id = MotionWechat::Config.app_id if app_id.empty?
  WXApi.registerApp @app_id
end

Instance Method Details

#handle_openURL(url, delegate) ⇒ Object



9
10
11
# File 'lib/motion_wechat/client.rb', line 9

def handle_openURL(url, delegate)
  WXApi.handleOpenURL(url, delegate:self)
end