module ROM::Github
Public Class Methods
create_container(*args, **opts)
click to toggle source
# File lib/rom/github.rb, line 25 def self.create_container(*args, **opts) config = if args.first.is_a?(ROM::Configuration) args.first else options = { uri: 'https://api.github.com', handlers: :json } options = Transproc::HashTransformations[:deep_merge].call(options, opts) ROM::Configuration.new(:http, options) end config.register_relation( ROM::Github::Resources::Repositories, ROM::Github::Resources::PullRequests ) config.register_mapper(ROM::Github::Mappers::PullRequestMapper) ROM.container(config) end