Class: SimpleWx::Base

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

Direct Known Subclasses

AccessToken, Media, Menu, Message, OAuth, Signaturer, UserInfo

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Base

Returns a new instance of Base.



5
6
7
8
9
10
# File 'lib/simple_wx/base.rb', line 5

def initialize options = {}
  raise 'SimpleWx.weixin_config is blank.' if SimpleWx.weixin_config.blank?
  @raise_flag = options[:raise_flag]
  @log_flag = options[:log_flag]
  @error = {}
end

Instance Attribute Details

#errorObject

Returns the value of attribute error.



3
4
5
# File 'lib/simple_wx/base.rb', line 3

def error
  @error
end

#raise_flagObject

Returns the value of attribute raise_flag.



3
4
5
# File 'lib/simple_wx/base.rb', line 3

def raise_flag
  @raise_flag
end

Class Method Details

.method_missing(m, *args) ⇒ Object



12
13
14
15
16
17
18
# File 'lib/simple_wx/base.rb', line 12

def self.method_missing m, *args
  if public_instance_methods(false).include? m.to_sym
    self.new(*args).send(m)
  else
    super
  end
end