class Object

Public Instance Methods

dependencies(**params, &block) click to toggle source
# File lib/iruby/dependencies.rb, line 59
def dependencies **params, &block
  config={}

  begin 
    if config_path = Bundler.settings['dependencies.config']
      uri = URI config_path
  
      json = case uri.scheme
        when /http/
          Net::HTTP.get(uri)
        else 
          File.read(uri.path)
        end
  
      config = JSON.parse(json)
    end
  
  rescue => ex
    warn "iruby-dependencies could not load #{config_path}: #{ex.message}"
  end

  IRuby::Dependencies.new config, **params, &block
end