Class: Cucumber::Messages::TestStepResult
- 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
-
#duration ⇒ Object
readonly
Returns the value of attribute duration.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Class Method Summary collapse
-
.from_h(hash) ⇒ Object
Returns a new TestStepResult from the given hash.
Instance Method Summary collapse
-
#initialize(duration: Duration.new, message: nil, status: TestStepResultStatus::UNKNOWN) ⇒ TestStepResult
constructor
A new instance of TestStepResult.
Methods included from Message::Utils
Methods included from Message::Serialization
Methods included from Message::Deserialization
Constructor Details
#initialize(duration: Duration.new, message: nil, status: TestStepResultStatus::UNKNOWN) ⇒ TestStepResult
Returns a new instance of TestStepResult.
1795 1796 1797 1798 1799 1800 1801 1802 1803 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 1795 def initialize( duration: Duration.new, message: nil, status: TestStepResultStatus::UNKNOWN ) @duration = duration @message = @status = status end |
Instance Attribute Details
#duration ⇒ Object (readonly)
Returns the value of attribute duration.
1789 1790 1791 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 1789 def duration @duration end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
1791 1792 1793 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 1791 def @message end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
1793 1794 1795 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 1793 def status @status end |
Class Method Details
.from_h(hash) ⇒ Object
Returns a new TestStepResult from the given hash. If the hash keys are camelCased, they are properly assigned to the corresponding snake_cased attributes.
Cucumber::Messages::TestStepResult.from_h(some_hash) # => #<Cucumber::Messages::TestStepResult:0x... ...>
1109 1110 1111 1112 1113 1114 1115 1116 1117 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.deserializers.rb', line 1109 def self.from_h(hash) return nil if hash.nil? self.new( duration: Duration.from_h(hash[:duration]), message: hash[:message], status: hash[:status], ) end |