class Dry::Monads::List::ListBuilder

@private

Attributes

type[R]

Public Class Methods

new(type) click to toggle source
# File lib/dry/monads/list.rb, line 391
def initialize(type)
  @type = type
end

Public Instance Methods

[](*args) click to toggle source
# File lib/dry/monads/list.rb, line 395
def [](*args)
  List.new(args, type)
end
coerce(value) click to toggle source
# File lib/dry/monads/list.rb, line 399
def coerce(value)
  List.coerce(value, type)
end
pure(val = Undefined, &block) click to toggle source
# File lib/dry/monads/list.rb, line 403
def pure(val = Undefined, &block)
  value = Undefined.default(val, block)
  List.pure(value, type)
end