Class: Cucumber::Messages::Ci
- Defined in:
- lib/cucumber/messages/ci.rb
Overview
Represents the Ci message in Cucumber’s message protocol.
CI environment
Instance Attribute Summary collapse
-
#build_number ⇒ Object
readonly
The build number.
-
#git ⇒ Object
readonly
Returns the value of attribute git.
-
#name ⇒ Object
readonly
Name of the CI product, e.g.
-
#url ⇒ Object
readonly
Link to the build.
Class Method Summary collapse
-
.from_h(hash) ⇒ Object
Returns a new Ci from the given hash.
Instance Method Summary collapse
-
#initialize(name: '', url: nil, build_number: nil, git: nil) ⇒ Ci
constructor
A new instance of Ci.
Methods inherited from Message
camelize, from_json, #to_h, #to_json
Constructor Details
#initialize(name: '', url: nil, build_number: nil, git: nil) ⇒ Ci
Returns a new instance of Ci.
30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/cucumber/messages/ci.rb', line 30 def initialize( name: '', url: nil, build_number: nil, git: nil ) @name = name @url = url @build_number = build_number @git = git super() end |
Instance Attribute Details
#build_number ⇒ Object (readonly)
The build number. Some CI servers use non-numeric build numbers, which is why this is a string
26 27 28 |
# File 'lib/cucumber/messages/ci.rb', line 26 def build_number @build_number end |
#git ⇒ Object (readonly)
Returns the value of attribute git.
28 29 30 |
# File 'lib/cucumber/messages/ci.rb', line 28 def git @git end |
#name ⇒ Object (readonly)
Name of the CI product, e.g. “Jenkins”, “CircleCI” etc.
16 17 18 |
# File 'lib/cucumber/messages/ci.rb', line 16 def name @name end |
#url ⇒ Object (readonly)
Link to the build
21 22 23 |
# File 'lib/cucumber/messages/ci.rb', line 21 def url @url end |