Skip to content

Commit

Permalink
Update .rbs
Browse files Browse the repository at this point in the history
The type definition of the logger faced the same issue as described in ruby/rbs#1482, so it was set to untyped.
  • Loading branch information
meri025 committed Jul 4, 2024
1 parent 04a04b2 commit a79da99
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
5 changes: 3 additions & 2 deletions sig/mysql_rewinder.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@ class MysqlRewinder
# @inserted_table_record_dir: Pathname
@cleaners: Array[Cleaner]
@inserted_tables: Set[String]
@logger: untyped

def self.setup: (Array[Hash[Symbol,String]] db_configs, ?except_tables: Array[String], ?adapter: ::Symbol) -> void
def self.setup: (Array[Hash[Symbol,String]] db_configs, ?except_tables: Array[String], ?adapter: ::Symbol, ?logger: untyped) -> void
def self.clean_all: () -> void
def self.clean: () -> void
def self.record_inserted_table: (String sql) -> void

def initialize: (db_configs: Array[Hash[Symbol,String]], except_tables: Array[String], adapter: ::Symbol) -> untyped
def initialize: (db_configs: Array[Hash[Symbol,String]], except_tables: Array[String], adapter: ::Symbol, logger: untyped) -> untyped
def record_inserted_table: (String sql) -> void
def reset_inserted_tables: () -> void
def calculate_inserted_tables: () -> void
Expand Down
7 changes: 6 additions & 1 deletion sig/mysql_rewinder/cleaner.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,17 @@ class MysqlRewinder
@client: Adapter
@except_tables: Array[String]
@all_tables: Array[String]
@logger: untyped

attr_reader db_config: Hash[Symbol,String]

def initialize: (Hash[Symbol,String] db_config, except_tables: Array[String], adapter: Symbol) -> untyped
def initialize: (Hash[Symbol,String] db_config, except_tables: Array[String], adapter: Symbol, ?logger: untyped) -> untyped
def clean_all: () -> void
def clean: (tables: untyped) -> void
def all_tables: () -> void

private

def log_and_execute: (String sql) -> void
end
end

0 comments on commit a79da99

Please sign in to comment.