Sha256: 38b7e8db032fc24019055b0acde025ec6ba6f86b0592c5e1181fa512421dfe43
Contents?: true
Size: 354 Bytes
Versions: 13
Compression:
Stored size: 354 Bytes
Contents
# frozen_string_literal: true class DefaultValue delegate :build, to: :builder attr_reader :klass, :method, :value def initialize(klass, method, value) @klass = klass @method = method @value = value end private def builder @builder ||= Sinclair.new(klass).tap do |b| b.add_method(method) { value } end end end
Version data entries
13 entries across 13 versions & 1 rubygems