Module: AliyunChatbot
- Defined in:
- lib/aliyun_chatbot/api.rb,
lib/aliyun_chatbot.rb,
lib/aliyun_chatbot/client.rb,
lib/aliyun_chatbot/config.rb,
lib/aliyun_chatbot/version.rb
Overview
Defined Under Namespace
Modules: Api Classes: Client, Config, Error
Constant Summary collapse
- VERSION =
"0.1.0"
Class Attribute Summary collapse
-
.config ⇒ Object
Returns the value of attribute config.
Class Method Summary collapse
Class Attribute Details
.config ⇒ Object
Returns the value of attribute config.
5 6 7 |
# File 'lib/aliyun_chatbot/config.rb', line 5 def config @config end |
Class Method Details
.configure {|self.config ||= Config.new| ... } ⇒ Object
7 8 9 10 11 12 13 14 15 |
# File 'lib/aliyun_chatbot/config.rb', line 7 def configure yield self.config ||= Config.new config.instance_variables.each do |var_sym| singleton_class.define_method var_sym.to_s.gsub(/^@/, '').to_sym do config.instance_variable_get var_sym end end end |