Class: Cucumber::Messages::DocString
- Defined in:
- lib/cucumber/messages/doc_string.rb
Overview
Represents the DocString message in Cucumber’s message protocol.
Instance Attribute Summary collapse
-
#content ⇒ Object
readonly
Returns the value of attribute content.
-
#delimiter ⇒ Object
readonly
Returns the value of attribute delimiter.
-
#location ⇒ Object
readonly
Returns the value of attribute location.
-
#media_type ⇒ Object
readonly
Returns the value of attribute media_type.
Class Method Summary collapse
-
.from_h(hash) ⇒ Object
Returns a new DocString from the given hash.
Instance Method Summary collapse
-
#initialize(location: Location.new, media_type: nil, content: '', delimiter: '') ⇒ DocString
constructor
A new instance of DocString.
Methods inherited from Message
camelize, from_json, #to_h, #to_json
Constructor Details
#initialize(location: Location.new, media_type: nil, content: '', delimiter: '') ⇒ DocString
Returns a new instance of DocString.
19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/cucumber/messages/doc_string.rb', line 19 def initialize( location: Location.new, media_type: nil, content: '', delimiter: '' ) @location = location @media_type = media_type @content = content @delimiter = delimiter super() end |
Instance Attribute Details
#content ⇒ Object (readonly)
Returns the value of attribute content.
15 16 17 |
# File 'lib/cucumber/messages/doc_string.rb', line 15 def content @content end |
#delimiter ⇒ Object (readonly)
Returns the value of attribute delimiter.
17 18 19 |
# File 'lib/cucumber/messages/doc_string.rb', line 17 def delimiter @delimiter end |
#location ⇒ Object (readonly)
Returns the value of attribute location.
11 12 13 |
# File 'lib/cucumber/messages/doc_string.rb', line 11 def location @location end |
#media_type ⇒ Object (readonly)
Returns the value of attribute media_type.
13 14 15 |
# File 'lib/cucumber/messages/doc_string.rb', line 13 def media_type @media_type end |