module DeepCover::StructWithOptions

Public Class Methods

new(*args) click to toggle source
# File lib/deep_cover/tools/struct_with_options.rb, line 11
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