lib/raap/cli.rb in raap-0.5.0 vs lib/raap/cli.rb in raap-0.6.0

- old
+ new

@@ -102,11 +102,11 @@ exit 1 end # Search skip tag @argv.each do |tag| - if tag.start_with?('!') && (tag.include?('#') || tag.include?('.')) + if tag.start_with?('!') t = tag[1..] or raise t = "::#{t}" unless t.start_with?('::') t or raise @skip << t end @@ -116,17 +116,17 @@ @argv.each do |tag| next if tag.start_with?('!') case when tag.include?('#') - run_by(kind: :instance, tag:) + run_by(kind: :instance, tag: tag) when tag.include?('.') - run_by(kind: :singleton, tag:) + run_by(kind: :singleton, tag: tag) when tag.end_with?('*') - run_by_type_name_with_search(tag:) + run_by_type_name_with_search(tag: tag) else - run_by_type_name(tag:) + run_by_type_name(tag: tag) end end report end @@ -196,13 +196,14 @@ type_params_decl = definition.type_params_decl type_args = type.args RaaP.logger.info("# #{type}") @results << { - method:, + method: method, properties: method.method_types.map do |method_type| - property(receiver_type:, type_params_decl:, type_args:, method_type:, method_name:) + property(receiver_type: receiver_type, type_params_decl: type_params_decl, type_args: type_args, method_type: method_type, + method_name: method_name) end } end def run_by_type_name_with_search(tag:) @@ -236,13 +237,14 @@ next unless method.accessibility == :public next if method.defined_in != type_name RaaP.logger.info("# #{type_name}.#{method_name}") @results << { - method:, + method: method, properties: method.method_types.map do |method_type| - property(receiver_type: Type.new("singleton(#{type.name})"), type_params_decl:, type_args:, method_type:, method_name:) + property(receiver_type: Type.new("singleton(#{type.name})"), type_params_decl: type_params_decl, type_args: type_args, + method_type: method_type, method_name: method_name) end } end definition = RBS.builder.build_instance(type_name) @@ -255,13 +257,14 @@ next unless method.accessibility == :public next if method.defined_in != type_name RaaP.logger.info("# #{type_name}##{method_name}") @results << { - method:, + method: method, properties: method.method_types.map do |method_type| - property(receiver_type: Type.new(type.name), type_params_decl:, type_args:, method_type:, method_name:) + property(receiver_type: Type.new(type.name), type_params_decl: type_params_decl, type_args: type_args, method_type: method_type, + method_name: method_name) end } end end @@ -281,15 +284,15 @@ end RaaP.logger.info("## def #{prefix}#{method_name}: #{method_type}") status = 0 reason = nil prop = MethodProperty.new( - receiver_type:, - method_name:, + receiver_type: receiver_type, + method_name: method_name, method_type: MethodType.new( method_type, - type_params_decl:, - type_args:, + type_params_decl: type_params_decl, + type_args: type_args, self_type: rtype, instance_type: ::RBS::Types::ClassInstance.new(name: rtype.name, args: type_args, location: nil), class_type: ::RBS::Types::ClassSingleton.new(name: rtype.name, location: nil), ), size_step: @option.size_from.step(to: @option.size_to, by: @option.size_by),