Module: Yao
- Extended by:
- Mode
- Defined in:
- lib/yao.rb,
lib/yao/auth.rb,
lib/yao/mode.rb,
lib/yao/error.rb,
lib/yao/token.rb,
lib/yao/client.rb,
lib/yao/config.rb,
lib/yao/tokenv3.rb,
lib/yao/version.rb,
lib/yao/resources.rb
Defined Under Namespace
Modules: Auth, Client, Mode, Plugins, Resources
Classes: BadMediaType, BadMethod, BadRequest, BuildInProgress, ComputeFault, Config, Conflict, Forbidden, ItemNotFound, NetworkNotFound, NotFound, OverLimit, ReadOnlyViolationError, ServerCapacityUnavailable, ServerError, ServiceUnavailable, Token, TokenV3, TooManyItemFonud, Unauthorized, UnprocessableEntity
Constant Summary
collapse
- VERSION =
"0.7.0"
Class Method Summary
collapse
Methods included from Mode
read_only, read_only!
Class Method Details
.config(&blk) ⇒ Object
70
71
72
73
74
75
76
77
78
|
# File 'lib/yao/config.rb', line 70
def self.config(&blk)
@__config ||= Config.new
if blk
@__config.delay_hook = true
@__config.instance_eval(&blk)
@__config.delay_hook = false
end
@__config
end
|
80
81
82
|
# File 'lib/yao/config.rb', line 80
def self.configure(&blk)
config(&blk)
end
|
.const_missing(name) ⇒ Object
37
38
39
40
41
42
|
# File 'lib/yao/resources.rb', line 37
def self.const_missing(name)
new_klass = Yao::Resources.const_get(name)
Yao.const_set(name, new_klass)
rescue NameError
super
end
|
.current_tenant_id(id = nil) ⇒ Object
65
66
67
68
69
70
|
# File 'lib/yao/token.rb', line 65
def self.current_tenant_id(id=nil)
if id
@__tenant_id = id
end
@__tenant_id
end
|