Class: Hancock::Configuration

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# File 'lib/hancock/configuration.rb', line 32

def initialize
  @main_index_layout = 'application'
  @error_layout = 'application'

  @localize = false

  @ability_manager_config = []
  @ability_admin_config = []

  @recaptcha_support = defined?(Recaptcha)
  @simple_captcha_support = defined?(SimpleCaptcha)

  @admin_enter_captcha = @recaptcha_support or @simple_captcha_support
  @registration_captcha = @admin_enter_captcha

  @captcha_on_development = false

  @history_tracking = false 
end

Instance Attribute Details

#ability_admin_configObject

Returns the value of attribute ability_admin_config.



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

def ability_admin_config
  @ability_admin_config
end

#ability_manager_configObject

Returns the value of attribute ability_manager_config.



20
21
22
# File 'lib/hancock/configuration.rb', line 20

def ability_manager_config
  @ability_manager_config
end

#admin_enter_captchaObject

Returns the value of attribute admin_enter_captcha.



23
24
25
# File 'lib/hancock/configuration.rb', line 23

def admin_enter_captcha
  @admin_enter_captcha
end

#captcha_on_developmentObject

Returns the value of attribute captcha_on_development.



28
29
30
# File 'lib/hancock/configuration.rb', line 28

def captcha_on_development
  @captcha_on_development
end

#error_layoutObject

Returns the value of attribute error_layout.



16
17
18
# File 'lib/hancock/configuration.rb', line 16

def error_layout
  @error_layout
end

#history_trackingObject

Returns the value of attribute history_tracking.



30
31
32
# File 'lib/hancock/configuration.rb', line 30

def history_tracking
  @history_tracking
end

#localizeObject

Returns the value of attribute localize.



18
19
20
# File 'lib/hancock/configuration.rb', line 18

def localize
  @localize
end

#main_index_layoutObject

Returns the value of attribute main_index_layout.



15
16
17
# File 'lib/hancock/configuration.rb', line 15

def main_index_layout
  @main_index_layout
end

#recaptcha_supportObject

Returns the value of attribute recaptcha_support.



25
26
27
# File 'lib/hancock/configuration.rb', line 25

def recaptcha_support
  @recaptcha_support
end

#registration_captchaObject

Returns the value of attribute registration_captcha.



24
25
26
# File 'lib/hancock/configuration.rb', line 24

def registration_captcha
  @registration_captcha
end

#simple_captcha_supportObject

Returns the value of attribute simple_captcha_support.



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

def simple_captcha_support
  @simple_captcha_support
end