Class: Applitools::AccessibilitySettings

Inherits:
Object
  • Object
show all
Extended by:
EyesConfigurationDSL
Defined in:
lib/applitools/core/accessibility_level.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.



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

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.



24
25
26
# File 'lib/applitools/core/accessibility_level.rb', line 24

def config_hash
  @config_hash
end

#validation_errorsObject

Returns the value of attribute validation_errors.



25
26
27
# File 'lib/applitools/core/accessibility_level.rb', line 25

def validation_errors
  @validation_errors
end

Instance Method Details

#json_dataObject



42
43
44
# File 'lib/applitools/core/accessibility_level.rb', line 42

def json_data
  to_h
end

#to_hObject



38
39
40
# File 'lib/applitools/core/accessibility_level.rb', line 38

def to_h
  @config_hash
end

#to_hashObject

accessibilitySettings?:

level?: AccessibilityLevel
guidelinesVersion?: AccessibilityGuidelinesVersion



50
51
52
53
54
55
# File 'lib/applitools/core/accessibility_level.rb', line 50

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