class Cucumber::Messages::Ci
Represents the Ci
message in Cucumber’s message protocol.
CI environment
Attributes
build_number[R]
The build number. Some CI servers use non-numeric build numbers, which is why this is a string
git[R]
name[R]
Name of the CI product, e.g. “Jenkins”, “CircleCI” etc.
url[R]
Link to the build
Public Class Methods
from_h(hash)
click to toggle source
Returns a new Ci
from the given hash. If the hash keys are camelCased, they are properly assigned to the corresponding snake_cased attributes.
Cucumber::Messages::Ci.from_h(some_hash) # => #<Cucumber::Messages::Ci:0x... ...>
# File lib/cucumber/messages/ci.rb, line 50 def self.from_h(hash) return nil if hash.nil? new( name: hash[:name], url: hash[:url], build_number: hash[:buildNumber], git: Git.from_h(hash[:git]) ) end
new( name: '', url: nil, build_number: nil, git: nil )
click to toggle source
Calls superclass method
# 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