Class: Cucumber::Messages::TestRunStarted

Inherits:
Message show all
Defined in:
lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb,
lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.deserializers.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Message::Utils

included

Methods included from Message::Serialization

#to_h, #to_json

Methods included from Message::Deserialization

included

Constructor Details

#initialize(timestamp: Timestamp.new) ⇒ TestRunStarted

Returns a new instance of TestRunStarted.



1743
1744
1745
1746
1747
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 1743

def initialize(
  timestamp: Timestamp.new
)
  @timestamp = timestamp
end

Instance Attribute Details

#timestampObject (readonly)

Returns the value of attribute timestamp.



1741
1742
1743
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 1741

def timestamp
  @timestamp
end

Class Method Details

.from_h(hash) ⇒ Object

Returns a new TestRunStarted from the given hash. If the hash keys are camelCased, they are properly assigned to the corresponding snake_cased attributes.

Cucumber::Messages::TestRunStarted.from_h(some_hash) # => #<Cucumber::Messages::TestRunStarted:0x... ...>


1068
1069
1070
1071
1072
1073
1074
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.deserializers.rb', line 1068

def self.from_h(hash)
  return nil if hash.nil?

  self.new(
    timestamp: Timestamp.from_h(hash[:timestamp]),
  )
end