Class: Screengem::Configuration

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

Overview

Configuration for the Screengem gem.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration



40
41
42
43
44
45
46
47
48
49
# File 'lib/screengem/configuration.rb', line 40

def initialize
  self.apply_dampening = false
  self.browser_actions = false

  self.dampen_configuration_root = "default"

  self.action_scope = "Actions"
  self.question_scope = "Questions"
  self.task_scope = "Tasks"
end

Instance Attribute Details

#action_scopeObject

A string that namespaces action classes (used by the ActionFactory).



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

def action_scope
  @action_scope
end

#apply_dampeningObject

A boolean that specifies that dampening is to be applied.



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

def apply_dampening
  @apply_dampening
end

#browser_actionsObject

A boolean that specifies that browser actions are created (used by the ActionFactory).



29
30
31
# File 'lib/screengem/configuration.rb', line 29

def browser_actions
  @browser_actions
end

#dampen_configuration_filenameObject

The name of the YAML file that is used to configure dampening.



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

def dampen_configuration_filename
  @dampen_configuration_filename
end

#dampen_configuration_rootObject

The top level key in the YAML file that is used to configure dampening.



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

def dampen_configuration_root
  @dampen_configuration_root
end

#question_scopeObject

A string that namespaces questions classes (used by the QuestionFactory).



35
36
37
# File 'lib/screengem/configuration.rb', line 35

def question_scope
  @question_scope
end

#task_scopeObject

A string that namespaces task classes (used by the TaskFactory).



38
39
40
# File 'lib/screengem/configuration.rb', line 38

def task_scope
  @task_scope
end

Instance Method Details

#apply_dampening?Boolean



51
52
53
# File 'lib/screengem/configuration.rb', line 51

def apply_dampening?
  apply_dampening
end

#browser_actions?Boolean



55
56
57
# File 'lib/screengem/configuration.rb', line 55

def browser_actions?
  browser_actions
end

#dampen_configuration_sample_filenameObject



59
60
61
# File 'lib/screengem/configuration.rb', line 59

def dampen_configuration_sample_filename
  "#{dampen_configuration_filename}.sample"
end