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
Public Class Methods
Source
# File lib/cucumber/messages/git.rb, line 42 def self.from_h(hash) return nil if hash.nil? new( remote: hash[:remote], revision: hash[:revision], branch: hash[:branch], tag: hash[:tag] ) end
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... ...>
Source
# File lib/cucumber/messages/git.rb, line 22 def initialize( remote: '', revision: '', branch: nil, tag: nil ) @remote = remote @revision = revision @branch = branch @tag = tag super() end
Calls superclass method