Module: Aliyun

Defined in:
lib/aliyun.rb,
lib/aliyun/ecs.rb,
lib/aliyun/version.rb,
lib/aliyun/aliyun_error.rb

Defined Under Namespace

Classes: AliyunError, Config, ECS

Constant Summary collapse

VERSION =
"0.1.2"

Class Method Summary collapse

Class Method Details

.[](key) ⇒ Object



23
24
25
# File 'lib/aliyun.rb', line 23

def self.[](key)
    Config.instance.send key if Config.instance.respond_to? key
end

.[]=(key, value) ⇒ Object



26
27
28
29
# File 'lib/aliyun.rb', line 26

def self.[]=(key,value)
    key="#{key}="
    Config.instance.send key,value if Config.instance.respond_to? key
end

.config(cfg) ⇒ Object



30
31
32
33
34
# File 'lib/aliyun.rb', line 30

def self.config(cfg)
    cfg.each do |k,v|
        self[k]=v
    end
end