Sha256: 969e5e67822b6b7b8f4e6bfff60e9505dd72b9ce42e15772d8c9c24fecde3200
Contents?: true
Size: 364 Bytes
Versions: 9
Compression:
Stored size: 364 Bytes
Contents
# frozen_string_literal: true require_relative 'klass_factory' # Defines a class factory that inherits from a class # that includes ProtectedConstructor. class KlassFactoryTwo < KlassFactory class << self def create(name, id) send(:new, name, id) end end attr_reader :name def initialize(name, id) super id @name = name end end
Version data entries
9 entries across 9 versions & 1 rubygems