Skip to content

Commit

Permalink
Correct example output
Browse files Browse the repository at this point in the history
  • Loading branch information
andyw8 committed Dec 5, 2023
1 parent 24fbc1e commit 6467c61
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 18 deletions.
20 changes: 11 additions & 9 deletions lib/tapioca/dsl/compilers/active_support_current_attributes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,24 +42,26 @@ module Compilers
# class Current
# include GeneratedAttributeMethods
#
# module GeneratedAttributeMethods
# sig { returns(T.untyped) }
# def self.account; end
#
# class << self
# sig { returns(T.untyped) }
# def account; end
#
# sig { params(account: T.untyped).returns(T.untyped) }
# def self.account=(account); end
#
# sig { params(account: T.untyped).returns(T.untyped) }
# def account=(account); end
#
# sig { params(user_id: Integer).void }
# def self.authenticate(user_id); end
# def authenticate(user_id); end
#
# sig { returns(T.untyped) }
# def self.helper; end
# def helper; end
# end
#
# module GeneratedAttributeMethods
# sig { returns(T.untyped) }
# def account; end
#
# sig { params(account: T.untyped).returns(T.untyped) }
# def account=(account); end
# end
# end
# ~~~
Expand Down
20 changes: 11 additions & 9 deletions manual/compiler_activesupportcurrentattributes.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,24 +30,26 @@ this compiler will produce an RBI file with the following content:
class Current
include GeneratedAttributeMethods

module GeneratedAttributeMethods
sig { returns(T.untyped) }
def self.account; end

class << self
sig { returns(T.untyped) }
def account; end

sig { params(account: T.untyped).returns(T.untyped) }
def self.account=(account); end

sig { params(account: T.untyped).returns(T.untyped) }
def account=(account); end

sig { params(user_id: Integer).void }
def self.authenticate(user_id); end
def authenticate(user_id); end

sig { returns(T.untyped) }
def self.helper; end
def helper; end
end

module GeneratedAttributeMethods
sig { returns(T.untyped) }
def account; end

sig { params(account: T.untyped).returns(T.untyped) }
def account=(account); end
end
end
~~~

0 comments on commit 6467c61

Please sign in to comment.