Class: Maquina::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/maquina.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# File 'lib/maquina.rb', line 24

def initialize
  @password_retain_count = 3
  @temporary_block = 5.minutes
  @session_expiration = 2.days
  @signin_attempts = 5
  @root_app_path = "/"

  @membership_roles = %w[admin member].index_by(&:itself)

  @importmap = Importmap::Map.new
  @importmap.draw(Engine.root.join("config/importmap.rb"))

  @tailwind_content = [
    "#{Maquina::Engine.root}/app/views/**/*.{rb,erb}",
    "#{Maquina::Engine.root}/app/helpers/**/*.rb",
    "#{Maquina::Engine.root}/app/controllers/**/*.rb",
    "#{Maquina::Engine.root}/app/javascript/**/*.js"
  ]
end

Instance Attribute Details

#importmapObject

Returns the value of attribute importmap.



21
22
23
# File 'lib/maquina.rb', line 21

def importmap
  @importmap
end

#membership_rolesObject

Returns the value of attribute membership_roles.



21
22
23
# File 'lib/maquina.rb', line 21

def membership_roles
  @membership_roles
end

#password_retain_countObject

Returns the value of attribute password_retain_count.



21
22
23
# File 'lib/maquina.rb', line 21

def password_retain_count
  @password_retain_count
end

#root_app_pathObject

Returns the value of attribute root_app_path.



21
22
23
# File 'lib/maquina.rb', line 21

def root_app_path
  @root_app_path
end

#session_expirationObject

Returns the value of attribute session_expiration.



21
22
23
# File 'lib/maquina.rb', line 21

def session_expiration
  @session_expiration
end

#signin_attemptsObject

Returns the value of attribute signin_attempts.



21
22
23
# File 'lib/maquina.rb', line 21

def 
  @signin_attempts
end

#tailwind_contentObject

Returns the value of attribute tailwind_content.



21
22
23
# File 'lib/maquina.rb', line 21

def tailwind_content
  @tailwind_content
end

#temporary_blockObject

Returns the value of attribute temporary_block.



21
22
23
# File 'lib/maquina.rb', line 21

def temporary_block
  @temporary_block
end