Method: GlobalID.create
- Defined in:
- lib/global_id/global_id.rb
.create(model, options = {}) ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'lib/global_id/global_id.rb', line 11 def create(model, = {}) if app = .fetch(:app) { GlobalID.app } params = .except(:app, :verifier, :for) new URI::GID.create(app, model, params), else raise ArgumentError, 'An app is required to create a GlobalID. ' \ 'Pass the :app option or set the default GlobalID.app.' end end |