Class: Applitools::Environment

Inherits:
Object
  • Object
show all
Defined in:
lib/eyes_selenium/eyes/environment.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(os = nil, hosting_app = nil, display_size = nil, inferred = nil) ⇒ Environment

Returns a new instance of Environment.



4
5
6
7
8
9
# File 'lib/eyes_selenium/eyes/environment.rb', line 4

def initialize(os=nil, hosting_app=nil, display_size=nil, inferred=nil)
  @os = os
  @hosting_app = hosting_app
  @display_size = display_size
  @inferred = inferred
end

Instance Attribute Details

#display_sizeObject

Returns the value of attribute display_size.



3
4
5
# File 'lib/eyes_selenium/eyes/environment.rb', line 3

def display_size
  @display_size
end

#hosting_appObject

Returns the value of attribute hosting_app.



3
4
5
# File 'lib/eyes_selenium/eyes/environment.rb', line 3

def hosting_app
  @hosting_app
end

#inferredObject

Returns the value of attribute inferred.



3
4
5
# File 'lib/eyes_selenium/eyes/environment.rb', line 3

def inferred
  @inferred
end

#osObject

Returns the value of attribute os.



3
4
5
# File 'lib/eyes_selenium/eyes/environment.rb', line 3

def os
  @os
end

Instance Method Details

#to_hashObject



11
12
13
14
# File 'lib/eyes_selenium/eyes/environment.rb', line 11

def to_hash
  # display_size is an Applitools::ViewportSize object
  { os: os, hostingApp: hosting_app, displaySize: display_size.to_hash, inferred: inferred}
end