Class: Applitools::UniversalEyesManagerConfig
- Inherits:
-
Object
- Object
- Applitools::UniversalEyesManagerConfig
- Defined in:
- lib/applitools/universal_sdk/universal_eyes_manager_config.rb
Constant Summary collapse
- VG =
'ufg'.freeze
- CLASSIC =
'classic'.freeze
Instance Attribute Summary collapse
-
#concurrency ⇒ Object
export type EyesManagerConfig<TType extends ‘vg’ | ‘classic’ = ‘vg’ | ‘classic’> = { type: TType concurrency?: TType extends ‘vg’ ? number : never legacy?: TType extends ‘vg’ ? boolean : never }.
-
#legacy ⇒ Object
export type EyesManagerConfig<TType extends ‘vg’ | ‘classic’ = ‘vg’ | ‘classic’> = { type: TType concurrency?: TType extends ‘vg’ ? number : never legacy?: TType extends ‘vg’ ? boolean : never }.
-
#runner_agent_id ⇒ Object
readonly
export type EyesManagerConfig<TType extends ‘vg’ | ‘classic’ = ‘vg’ | ‘classic’> = { type: TType concurrency?: TType extends ‘vg’ ? number : never legacy?: TType extends ‘vg’ ? boolean : never }.
-
#type ⇒ Object
export type EyesManagerConfig<TType extends ‘vg’ | ‘classic’ = ‘vg’ | ‘classic’> = { type: TType concurrency?: TType extends ‘vg’ ? number : never legacy?: TType extends ‘vg’ ? boolean : never }.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(*args) ⇒ UniversalEyesManagerConfig
constructor
A new instance of UniversalEyesManagerConfig.
- #to_hash ⇒ Object
- #type_enum_values ⇒ Object
Constructor Details
#initialize(*args) ⇒ UniversalEyesManagerConfig
Returns a new instance of UniversalEyesManagerConfig.
27 28 29 30 31 32 33 |
# File 'lib/applitools/universal_sdk/universal_eyes_manager_config.rb', line 27 def initialize(*args) = Applitools::Utils.(args) self.type = [:type].to_s self.concurrency = [:concurrency] self.legacy = [:legacy] @runner_agent_id = [:runner_agent_id] end |
Instance Attribute Details
#concurrency ⇒ Object
export type EyesManagerConfig<TType extends ‘vg’ | ‘classic’ = ‘vg’ | ‘classic’> =
type: TType
concurrency?: TType extends 'vg' ? number : never
legacy?: TType extends 'vg' ? boolean : never
19 20 21 |
# File 'lib/applitools/universal_sdk/universal_eyes_manager_config.rb', line 19 def concurrency @concurrency end |
#legacy ⇒ Object
export type EyesManagerConfig<TType extends ‘vg’ | ‘classic’ = ‘vg’ | ‘classic’> =
type: TType
concurrency?: TType extends 'vg' ? number : never
legacy?: TType extends 'vg' ? boolean : never
19 20 21 |
# File 'lib/applitools/universal_sdk/universal_eyes_manager_config.rb', line 19 def legacy @legacy end |
#runner_agent_id ⇒ Object (readonly)
export type EyesManagerConfig<TType extends ‘vg’ | ‘classic’ = ‘vg’ | ‘classic’> =
type: TType
concurrency?: TType extends 'vg' ? number : never
legacy?: TType extends 'vg' ? boolean : never
19 20 21 |
# File 'lib/applitools/universal_sdk/universal_eyes_manager_config.rb', line 19 def runner_agent_id @runner_agent_id end |
#type ⇒ Object
export type EyesManagerConfig<TType extends ‘vg’ | ‘classic’ = ‘vg’ | ‘classic’> =
type: TType
concurrency?: TType extends 'vg' ? number : never
legacy?: TType extends 'vg' ? boolean : never
19 20 21 |
# File 'lib/applitools/universal_sdk/universal_eyes_manager_config.rb', line 19 def type @type end |
Class Method Details
.classic ⇒ Object
6 7 8 |
# File 'lib/applitools/universal_sdk/universal_eyes_manager_config.rb', line 6 def self.classic new(type: CLASSIC, runner_agent_id: "eyes.classic.ruby/#{Applitools::VERSION}") end |
.vg(concurrent_open_sessions = 1) ⇒ Object
10 11 12 |
# File 'lib/applitools/universal_sdk/universal_eyes_manager_config.rb', line 10 def self.vg(concurrent_open_sessions=1) new(type: VG, concurrency: concurrent_open_sessions, legacy: false, runner_agent_id: "eyes.visualgrid.ruby/#{Applitools::VERSION}") end |
Instance Method Details
#to_hash ⇒ Object
53 54 55 56 57 58 59 60 61 |
# File 'lib/applitools/universal_sdk/universal_eyes_manager_config.rb', line 53 def to_hash result = {} result[:type] = type result[:settings] = {} result[:settings][:concurrency] = concurrency if concurrency result[:settings][:legacyConcurrency] = legacy if legacy result[:settings][:agentId] = runner_agent_id result.compact end |