lib/tapioca/rbi_ext/model.rb in tapioca-0.10.2 vs lib/tapioca/rbi_ext/model.rb in tapioca-0.10.3

- old
+ new

@@ -81,16 +81,19 @@ name: String, parameters: T::Array[TypedParam], return_type: String, class_method: T::Boolean, visibility: RBI::Visibility, + comments: T::Array[RBI::Comment], ).void end - def create_method(name, parameters: [], return_type: "T.untyped", class_method: false, visibility: RBI::Public.new) + def create_method(name, parameters: [], return_type: "T.untyped", class_method: false, visibility: RBI::Public.new, + comments: []) return unless Tapioca::RBIHelper.valid_method_name?(name) sig = RBI::Sig.new(return_type: return_type) - method = RBI::Method.new(name, sigs: [sig], is_singleton: class_method, visibility: visibility) + method = RBI::Method.new(name, sigs: [sig], is_singleton: class_method, visibility: visibility, + comments: comments) parameters.each do |param| method << param.param sig << RBI::SigParam.new(param.param.name, param.type) end self << method