Class: Cucumber::Messages::PickleDocString
- 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
-
#content ⇒ Object
readonly
Returns the value of attribute content.
-
#media_type ⇒ Object
readonly
Returns the value of attribute media_type.
Class Method Summary collapse
-
.from_h(hash) ⇒ Object
Returns a new PickleDocString from the given hash.
Instance Method Summary collapse
-
#initialize(media_type: nil, content: '') ⇒ PickleDocString
constructor
A new instance of PickleDocString.
Methods included from Message::Utils
Methods included from Message::Serialization
Methods included from Message::Deserialization
Constructor Details
#initialize(media_type: nil, content: '') ⇒ PickleDocString
Returns a new instance of PickleDocString.
1146 1147 1148 1149 1150 1151 1152 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 1146 def initialize( media_type: nil, content: '' ) @media_type = media_type @content = content end |
Instance Attribute Details
#content ⇒ Object (readonly)
Returns the value of attribute content.
1144 1145 1146 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 1144 def content @content end |
#media_type ⇒ Object (readonly)
Returns the value of attribute media_type.
1142 1143 1144 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 1142 def media_type @media_type end |
Class Method Details
.from_h(hash) ⇒ Object
Returns a new PickleDocString from the given hash. If the hash keys are camelCased, they are properly assigned to the corresponding snake_cased attributes.
Cucumber::Messages::PickleDocString.from_h(some_hash) # => #<Cucumber::Messages::PickleDocString:0x... ...>
635 636 637 638 639 640 641 642 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.deserializers.rb', line 635 def self.from_h(hash) return nil if hash.nil? self.new( media_type: hash[:mediaType], content: hash[:content], ) end |