Class: Applitools::BatchInfo
- Inherits:
-
Object
- Object
- Applitools::BatchInfo
- Defined in:
- lib/applitools/core/batch_info.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
-
#name ⇒ Object
Returns the value of attribute name.
-
#started_at ⇒ Object
Returns the value of attribute started_at.
Instance Method Summary collapse
-
#initialize(name = nil, started_at = Time.now) ⇒ BatchInfo
constructor
A new instance of BatchInfo.
- #to_hash ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(name = nil, started_at = Time.now) ⇒ BatchInfo
Returns a new instance of BatchInfo.
6 7 8 9 10 |
# File 'lib/applitools/core/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
#id ⇒ Object
Returns the value of attribute id.
5 6 7 |
# File 'lib/applitools/core/batch_info.rb', line 5 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
5 6 7 |
# File 'lib/applitools/core/batch_info.rb', line 5 def name @name end |
#started_at ⇒ Object
Returns the value of attribute started_at.
5 6 7 |
# File 'lib/applitools/core/batch_info.rb', line 5 def started_at @started_at end |
Instance Method Details
#to_hash ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/applitools/core/batch_info.rb', line 12 def to_hash { 'id' => @id, 'name' => @name, 'startedAt' => @started_at.iso8601 } end |
#to_s ⇒ Object
20 21 22 |
# File 'lib/applitools/core/batch_info.rb', line 20 def to_s to_hash.to_s end |