Exception: BosClient::Error
- Inherits:
-
StandardError
- Object
- StandardError
- BosClient::Error
- Defined in:
- lib/bos_client/error.rb
Class Method Summary collapse
Class Method Details
.bos_error(name, message) ⇒ Object
5 6 7 8 9 10 11 |
# File 'lib/bos_client/error.rb', line 5 def bos_error(name, ) if const_defined?(name) eval "BosClient::Error::#{name}.new \"#{message}\"" else BosClient::Error.const_set(name.to_sym, Class.new(BosClient::Error)).new() end end |
.const_missing(name) ⇒ Object
13 14 15 |
# File 'lib/bos_client/error.rb', line 13 def const_missing(name) BosClient::Error.const_set(name.to_sym, Class.new(BosClient::Error)) end |