# frozen_string_literal: true module UnrealReaper module PackageObjExt class << self def included(cls) return if cls.method_defined?(:obj) cls.class_eval do attr_reader :obj, :options end end alias prepended included end def initialize(obj, opts) @obj = obj @options = opts if method(__method__).super_method.arity == 0 super() else super end end def _write(data) data.each do |attr_name, val| self.send("#{attr_name}=", val) end end end end