Module: BitBucket::AutoloadHelper
- Defined in:
- lib/bitbucket_rest_api.rb
Instance Method Summary collapse
- #autoload_all(prefix, options) ⇒ Object
- #lookup_constant(const_name) ⇒ Object
- #register_constant(options) ⇒ Object
Instance Method Details
permalink #autoload_all(prefix, options) ⇒ Object
[View source]
37 38 39 40 41 |
# File 'lib/bitbucket_rest_api.rb', line 37 def autoload_all(prefix, ) .each do |const_name, path| autoload const_name, File.join(prefix, path) end end |
permalink #lookup_constant(const_name) ⇒ Object
[View source]
49 50 51 |
# File 'lib/bitbucket_rest_api.rb', line 49 def lookup_constant(const_name) const_get const_name.upcase.to_s end |
permalink #register_constant(options) ⇒ Object
[View source]
43 44 45 46 47 |
# File 'lib/bitbucket_rest_api.rb', line 43 def register_constant() .each do |const_name, value| const_set const_name.upcase.to_s, value end end |