From 35e4b67a47bf6dc7bf728ced42ac46905a6c7334 Mon Sep 17 00:00:00 2001 From: mattkhan <86168986+mattkhan@users.noreply.github.com> Date: Mon, 27 Jan 2025 23:54:00 -0800 Subject: [PATCH] fix: optional params --- lib/anchor/type_script/schema_generator.rb | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/anchor/type_script/schema_generator.rb b/lib/anchor/type_script/schema_generator.rb index 34f49d8..732f437 100644 --- a/lib/anchor/type_script/schema_generator.rb +++ b/lib/anchor/type_script/schema_generator.rb @@ -27,9 +27,12 @@ def enums end class MultifileSchemaGenerator < Anchor::SchemaGenerator - def initialize(**opts) - super(**opts.except(:manually_editable)) - @manually_editable = opts[:manually_editable] || false + def initialize(register:, context: {}, include_all_fields: false, exclude_fields: nil, manually_editable: true) # rubocop:disable Lint/MissingSuper + @register = register + @context = context + @include_all_fields = include_all_fields + @exclude_fields = exclude_fields + @manually_editable = :manually_editable end def call