Sha256: 303ad9a5a5fbe34b1679f950e9c550dff3beeb15d7888c46f5eef44bc5c39619
Contents?: true
Size: 448 Bytes
Versions: 1
Compression:
Stored size: 448 Bytes
Contents
# frozen_string_literal: true module DeepCover module StructWithOptions module Initializer def initialize(*args, **options) super(*args, options) end end def self.new(*args) Struct.new(*args, :options).tap do |klass| klass.include Initializer class << klass undef_method :new end klass.define_singleton_method(:new, Class.method(:new)) end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
deep-cover-core-1.1.0 | lib/deep_cover/tools/struct_with_options.rb |