class Cucumber::Messages::Timestamp
Attributes
nanos[R]
Non-negative fractions of a second at nanosecond resolution. Negative
second values with fractions must still have non-negative nanos values that count forward in time. Must be from 0 to 999,999,999 inclusive.
seconds[R]
Represents seconds of UTC time since Unix epoch
1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.
Public Class Methods
from_h(hash)
click to toggle source
Returns a new Timestamp
from the given hash. If the hash keys are camelCased, they are properly assigned to the corresponding snake_cased attributes.
Cucumber::Messages::Timestamp.from_h(some_hash) # => #<Cucumber::Messages::Timestamp:0x... ...>
# File lib/cucumber/messages.deserializers.rb, line 1150 def self.from_h(hash) return nil if hash.nil? self.new( seconds: hash[:seconds], nanos: hash[:nanos], ) end
new( seconds: 0, nanos: 0 )
click to toggle source
# File lib/cucumber/messages.dtos.rb, line 1854 def initialize( seconds: 0, nanos: 0 ) @seconds = seconds @nanos = nanos end