Convert name to constant.
Passes configuration options to instantiated class.
Instantiates a new github api object.
Convert name to constant
2526272829 | # File 'lib/github_api/api/factory.rb', line 25defself.convert_to_constant(classes)classes.split('::').inject(Github)do|constant,klass|constant.const_getklassendend |
Passes configuration options to instantiated class
18192021 | # File 'lib/github_api/api/factory.rb', line 18defself.create_instance(klass,,&block).symbolize_keys!convert_to_constant(klass.to_s).new,&blockend |
Instantiates a new github api object
Raises:
11121314 | # File 'lib/github_api/api/factory.rb', line 11defself.new(klass,={},&block)returncreate_instance(klass,,&block)ifklassraiseArgumentError,'must provide API class to be instantiated'end |