class Cucumber::Messages::Git

Represents the Git message in Cucumber’s message protocol.

Information about Git, provided by the Build/CI server as environment

variables.

Attributes

branch[R]
remote[R]
revision[R]
tag[R]

Public Class Methods

from_h(hash) click to toggle source

Returns a new Git from the given hash. If the hash keys are camelCased, they are properly assigned to the corresponding snake_cased attributes.

Cucumber::Messages::Git.from_h(some_hash) # => #<Cucumber::Messages::Git:0x... ...>
# File lib/cucumber/messages.deserializers.rb, line 524
def self.from_h(hash)
  return nil if hash.nil?

  self.new(
    remote: hash[:remote],
    revision: hash[:revision],
    branch: hash[:branch],
    tag: hash[:tag],
  )
end
new( remote: '', revision: '', branch: nil, tag: nil ) click to toggle source
# File lib/cucumber/messages.dtos.rb, line 948
def initialize(
  remote: '',
  revision: '',
  branch: nil,
  tag: nil
)
  @remote = remote
  @revision = revision
  @branch = branch
  @tag = tag
end