Class: Cucumber::Messages::Git
- Defined in:
- lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb,
lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.deserializers.rb
Overview
Represents the Git message in Cucumber’s message protocol.
Information about Git, provided by the Build/CI server as environment
variables.
Instance Attribute Summary collapse
-
#branch ⇒ Object
readonly
Returns the value of attribute branch.
-
#remote ⇒ Object
readonly
Returns the value of attribute remote.
-
#revision ⇒ Object
readonly
Returns the value of attribute revision.
-
#tag ⇒ Object
readonly
Returns the value of attribute tag.
Class Method Summary collapse
-
.from_h(hash) ⇒ Object
Returns a new Git from the given hash.
Instance Method Summary collapse
-
#initialize(remote: '', revision: '', branch: nil, tag: nil) ⇒ Git
constructor
A new instance of Git.
Methods included from Message::Utils
Methods included from Message::Serialization
Methods included from Message::Deserialization
Constructor Details
#initialize(remote: '', revision: '', branch: nil, tag: nil) ⇒ Git
Returns a new instance of Git.
952 953 954 955 956 957 958 959 960 961 962 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 952 def initialize( remote: '', revision: '', branch: nil, tag: nil ) @remote = remote @revision = revision @branch = branch @tag = tag end |
Instance Attribute Details
#branch ⇒ Object (readonly)
Returns the value of attribute branch.
948 949 950 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 948 def branch @branch end |
#remote ⇒ Object (readonly)
Returns the value of attribute remote.
944 945 946 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 944 def remote @remote end |
#revision ⇒ Object (readonly)
Returns the value of attribute revision.
946 947 948 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 946 def revision @revision end |
#tag ⇒ Object (readonly)
Returns the value of attribute tag.
950 951 952 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 950 def tag @tag end |
Class Method Details
.from_h(hash) ⇒ Object
525 526 527 528 529 530 531 532 533 534 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.deserializers.rb', line 525 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 |