class Contracts::Builtin::CollectionOf::Factory
Public Class Methods
new(collection_class, &before_new)
click to toggle source
# File lib/contracts/builtin_contracts.rb, line 314 def initialize(collection_class, &before_new) @collection_class = collection_class @before_new = before_new end
Public Instance Methods
new(contract)
click to toggle source
# File lib/contracts/builtin_contracts.rb, line 319 def new(contract) @before_new&.call CollectionOf.new(@collection_class, contract) end
Also aliased as: []