Class: Cucumber::Messages::Timestamp
- 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
-
#nanos ⇒ Object
readonly
Non-negative fractions of a second at nanosecond resolution.
-
#seconds ⇒ Object
readonly
Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z.
Class Method Summary collapse
-
.from_h(hash) ⇒ Object
Returns a new Timestamp from the given hash.
Instance Method Summary collapse
-
#initialize(seconds: 0, nanos: 0) ⇒ Timestamp
constructor
A new instance of Timestamp.
Methods included from Message::Utils
Methods included from Message::Serialization
Methods included from Message::Deserialization
Constructor Details
#initialize(seconds: 0, nanos: 0) ⇒ Timestamp
Returns a new instance of Timestamp.
1856 1857 1858 1859 1860 1861 1862 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 1856 def initialize( seconds: 0, nanos: 0 ) @seconds = seconds @nanos = nanos end |
Instance Attribute Details
#nanos ⇒ Object (readonly)
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.
1854 1855 1856 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 1854 def nanos @nanos end |
#seconds ⇒ Object (readonly)
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.
1846 1847 1848 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 1846 def seconds @seconds end |
Class Method Details
.from_h(hash) ⇒ Object
1151 1152 1153 1154 1155 1156 1157 1158 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.deserializers.rb', line 1151 def self.from_h(hash) return nil if hash.nil? self.new( seconds: hash[:seconds], nanos: hash[:nanos], ) end |