Class: Applitools::AccessibilitySettings

Inherits:
Object
  • Object
show all
Extended by:
EyesConfigurationDSL
Defined in:
lib/applitools/core/accessibility_settings.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from EyesConfigurationDSL

accessor_methods, boolean_field, collect_method, enum_field, int_field, methods_to_delegate, object_field, string_field

Constructor Details

#initialize(accessibility_level, guidelines_version) ⇒ AccessibilitySettings

Returns a new instance of AccessibilitySettings.



12
13
14
15
16
17
# File 'lib/applitools/core/accessibility_settings.rb', line 12

def initialize(accessibility_level, guidelines_version)
  @config_hash = {}
  self.validation_errors = []
  self.level = accessibility_level
  self.version = guidelines_version
end

Instance Attribute Details

#config_hashObject (readonly)

Returns the value of attribute config_hash.



5
6
7
# File 'lib/applitools/core/accessibility_settings.rb', line 5

def config_hash
  @config_hash
end

#validation_errorsObject

Returns the value of attribute validation_errors.



6
7
8
# File 'lib/applitools/core/accessibility_settings.rb', line 6

def validation_errors
  @validation_errors
end

Instance Method Details

#json_dataObject



23
24
25
# File 'lib/applitools/core/accessibility_settings.rb', line 23

def json_data
  to_h
end

#to_hObject



19
20
21
# File 'lib/applitools/core/accessibility_settings.rb', line 19

def to_h
  @config_hash
end

#to_hashObject

accessibilitySettings?:

level?: AccessibilityLevel
guidelinesVersion?: AccessibilityGuidelinesVersion



31
32
33
34
35
36
# File 'lib/applitools/core/accessibility_settings.rb', line 31

def to_hash
  {
    level: level,
    guidelinesVersion: version
  }
end