File tree Expand file tree Collapse file tree 1 file changed +30
-1
lines changed
lib/tapioca/dsl/compilers Expand file tree Collapse file tree 1 file changed +30
-1
lines changed Original file line number Diff line number Diff line change 11# typed: true
22# frozen_string_literal: true
33
4- require "devise"
4+ return unless defined? ( Devise )
55
66module Tapioca
77 module Dsl
88 module Compilers
9+ # `Tapioca::Dsl::Compilers::Devise` generates RBI files for `ApplicationController``
10+ #
11+ # For example, with the following routes configuration:
12+ #
13+ # ~~~rb
14+ # Rails.application.routes.draw do
15+ # devise_for :users
16+ # end
17+ # ~~~
18+ #
19+ # this compiler will produce the RBI file `user.rbi` with the following content:
20+ #
21+ # ~~~rbi
22+ # # user.rbi
23+ # # typed: true
24+ # class ApplicationController
25+ # sig { returns(T.nilable(T::Hash[T.untyped, T.untyped])) }
26+ # def user_session; end
27+ #
28+ # sig { returns(T::Boolean) }
29+ # def user_signed_in?; end
30+ #
31+ # sig { void }
32+ # def authenticate_user!; end
33+ #
34+ # sig { returns(T.nilable(User)) }
35+ # def current_user; end
36+ # end
37+ # ~~~
938 class Devise < Tapioca ::Dsl ::Compiler
1039 extend T ::Sig
1140
You can’t perform that action at this time.
0 commit comments