Class: Preseason::Config::Authentication
- Inherits:
-
Object
- Object
- Preseason::Config::Authentication
show all
- Includes:
- Preseason::Config
- Defined in:
- lib/preseason/config/authentication.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
#ask, #readme, #yes?
#method_missing
Instance Attribute Details
#library ⇒ Object
Returns the value of attribute library.
6
7
8
|
# File 'lib/preseason/config/authentication.rb', line 6
def library
@library
end
|
Instance Method Details
#active_admin? ⇒ Boolean
16
17
18
|
# File 'lib/preseason/config/authentication.rb', line 16
def active_admin?
library == :active_admin
end
|
#ask_user ⇒ Object
8
9
10
11
12
13
14
|
# File 'lib/preseason/config/authentication.rb', line 8
def ask_user
if yes? "Will you be using ActiveAdmin? [y/n]"
self.library = :active_admin
elsif yes? "Ok then, how about Devise? [y/n]"
self.library = :devise
end
end
|
#devise? ⇒ Boolean
20
21
22
|
# File 'lib/preseason/config/authentication.rb', line 20
def devise?
library == :devise || active_admin?
end
|