Class: BBC::A11y::Configuration::Settings

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(before_all_hooks = [], after_all_hooks = [], pages = []) ⇒ Settings

Returns a new instance of Settings.



62
63
64
65
66
67
# File 'lib/bbc/a11y/configuration.rb', line 62

def initialize(before_all_hooks = [], after_all_hooks = [], pages = [])
  @before_all_hooks = before_all_hooks
  @after_all_hooks = after_all_hooks
  @pages = pages
  freeze
end

Instance Attribute Details

#after_all_hooksObject (readonly)

Returns the value of attribute after_all_hooks.



58
59
60
# File 'lib/bbc/a11y/configuration.rb', line 58

def after_all_hooks
  @after_all_hooks
end

#before_all_hooksObject (readonly)

Returns the value of attribute before_all_hooks.



58
59
60
# File 'lib/bbc/a11y/configuration.rb', line 58

def before_all_hooks
  @before_all_hooks
end

#pagesObject (readonly)

Returns the value of attribute pages.



58
59
60
# File 'lib/bbc/a11y/configuration.rb', line 58

def pages
  @pages
end

Instance Method Details

#with_pages(new_pages) ⇒ Object



69
70
71
# File 'lib/bbc/a11y/configuration.rb', line 69

def with_pages(new_pages)
  self.class.new(before_all_hooks, after_all_hooks, new_pages)
end