Class: Gitt::Models::Trailer
- Inherits:
-
Data
- Object
- Data
- Gitt::Models::Trailer
- Defined in:
- lib/gitt/models/trailer.rb
Overview
Represents commit trailer details.
Instance Attribute Summary collapse
-
#delimiter ⇒ Object
readonly
Returns the value of attribute delimiter.
-
#key ⇒ Object
readonly
Returns the value of attribute key.
-
#space ⇒ Object
readonly
Returns the value of attribute space.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Class Method Summary collapse
Instance Method Summary collapse
- #empty? ⇒ Boolean
-
#initialize(key:, value:, delimiter: ":", space: " ") ⇒ Trailer
constructor
A new instance of Trailer.
- #to_s ⇒ Object
Constructor Details
#initialize(key:, value:, delimiter: ":", space: " ") ⇒ Trailer
Returns a new instance of Trailer.
9 10 11 |
# File 'lib/gitt/models/trailer.rb', line 9 def initialize key:, value:, delimiter: ":", space: " " super end |
Instance Attribute Details
#delimiter ⇒ Object (readonly)
Returns the value of attribute delimiter
6 7 8 |
# File 'lib/gitt/models/trailer.rb', line 6 def delimiter @delimiter end |
#key ⇒ Object (readonly)
Returns the value of attribute key
6 7 8 |
# File 'lib/gitt/models/trailer.rb', line 6 def key @key end |
#space ⇒ Object (readonly)
Returns the value of attribute space
6 7 8 |
# File 'lib/gitt/models/trailer.rb', line 6 def space @space end |
#value ⇒ Object (readonly)
Returns the value of attribute value
6 7 8 |
# File 'lib/gitt/models/trailer.rb', line 6 def value @value end |
Class Method Details
Instance Method Details
#empty? ⇒ Boolean
13 |
# File 'lib/gitt/models/trailer.rb', line 13 def empty? = String(key).empty? || String(value).empty? |
#to_s ⇒ Object
15 |
# File 'lib/gitt/models/trailer.rb', line 15 def to_s = to_h.values.join |