Class: Spree::Auth::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/spree/auth/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



12
13
14
15
16
17
18
19
20
# File 'lib/spree/auth/configuration.rb', line 12

def initialize
  self.registration_step = true
  self.signout_after_password_change = true
  self.confirmable = false
  self.database_authenticatable = true
  self.recoverable = true
  self.registerable = true
  self.validatable = true
end

Instance Attribute Details

#confirmableObject

Returns the value of attribute confirmable.



4
5
6
# File 'lib/spree/auth/configuration.rb', line 4

def confirmable
  @confirmable
end

#database_authenticatableObject

Returns the value of attribute database_authenticatable.



4
5
6
# File 'lib/spree/auth/configuration.rb', line 4

def database_authenticatable
  @database_authenticatable
end

#recoverableObject

Returns the value of attribute recoverable.



4
5
6
# File 'lib/spree/auth/configuration.rb', line 4

def recoverable
  @recoverable
end

#registerableObject

Returns the value of attribute registerable.



4
5
6
# File 'lib/spree/auth/configuration.rb', line 4

def registerable
  @registerable
end

#registration_stepObject

Returns the value of attribute registration_step.



4
5
6
# File 'lib/spree/auth/configuration.rb', line 4

def registration_step
  @registration_step
end

#signout_after_password_changeObject

Returns the value of attribute signout_after_password_change.



4
5
6
# File 'lib/spree/auth/configuration.rb', line 4

def signout_after_password_change
  @signout_after_password_change
end

#validatableObject

Returns the value of attribute validatable.



4
5
6
# File 'lib/spree/auth/configuration.rb', line 4

def validatable
  @validatable
end

Instance Method Details

#configure {|_self| ... } ⇒ Object

Yields:

  • (_self)

Yield Parameters:



22
23
24
# File 'lib/spree/auth/configuration.rb', line 22

def configure
  yield(self) if block_given?
end

#get(preference) ⇒ Object Also known as: []



26
27
28
# File 'lib/spree/auth/configuration.rb', line 26

def get(preference)
  send(preference)
end

#set(preference, value) ⇒ Object Also known as: []=



32
33
34
# File 'lib/spree/auth/configuration.rb', line 32

def set(preference, value)
  send("#{preference}=", value)
end