Class: Applitools::BatchInfo

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name = nil, started_at = Time.now) ⇒ BatchInfo

Returns a new instance of BatchInfo.



6
7
8
9
10
# File 'lib/eyes_selenium/eyes/batch_info.rb', line 6

def initialize(name=nil, started_at = Time.now)
  @name = name
  @started_at = started_at
  @id = SecureRandom.uuid
end

Instance Attribute Details

#idObject

Returns the value of attribute id.



4
5
6
# File 'lib/eyes_selenium/eyes/batch_info.rb', line 4

def id
  @id
end

#nameObject (readonly)

Returns the value of attribute name.



5
6
7
# File 'lib/eyes_selenium/eyes/batch_info.rb', line 5

def name
  @name
end

#started_atObject (readonly)

Returns the value of attribute started_at.



5
6
7
# File 'lib/eyes_selenium/eyes/batch_info.rb', line 5

def started_at
  @started_at
end

Instance Method Details

#to_hashObject



12
13
14
15
16
17
18
# File 'lib/eyes_selenium/eyes/batch_info.rb', line 12

def to_hash
  {
    name: name,
    id: id,
    startedAt: started_at.iso8601
  }
end