Module: BitBucket::AutoloadHelper

Included in:
BitBucket, Issues, Repos, Users, Validations
Defined in:
lib/bitbucket_rest_api.rb

Instance Method Summary collapse

Instance Method Details

#autoload_all(prefix, options) ⇒ Object



41
42
43
44
45
# File 'lib/bitbucket_rest_api.rb', line 41

def autoload_all(prefix, options)
  options.each do |const_name, path|
    autoload const_name, File.join(prefix, path)
  end
end

#lookup_constant(const_name) ⇒ Object



53
54
55
# File 'lib/bitbucket_rest_api.rb', line 53

def lookup_constant(const_name)
  const_get const_name.upcase.to_s
end

#register_constant(options) ⇒ Object



47
48
49
50
51
# File 'lib/bitbucket_rest_api.rb', line 47

def register_constant(options)
  options.each do |const_name, value|
    const_set const_name.upcase.to_s, value
  end
end