Class: Gitt::Models::Trailer

Inherits:
Struct
  • Object
show all
Defined in:
lib/gitt/models/trailer.rb

Overview

Represents commit trailer details.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeTrailer

Returns a new instance of Trailer.



9
10
11
12
# File 'lib/gitt/models/trailer.rb', line 9

def initialize(**)
  super
  freeze
end

Instance Attribute Details

#delimiterObject

Returns the value of attribute delimiter

Returns:

  • (Object)

    the current value of delimiter



6
7
8
# File 'lib/gitt/models/trailer.rb', line 6

def delimiter
  @delimiter
end

#keyObject

Returns the value of attribute key

Returns:

  • (Object)

    the current value of key



6
7
8
# File 'lib/gitt/models/trailer.rb', line 6

def key
  @key
end

#spaceObject

Returns the value of attribute space

Returns:

  • (Object)

    the current value of space



6
7
8
# File 'lib/gitt/models/trailer.rb', line 6

def space
  @space
end

#valueObject

Returns the value of attribute value

Returns:

  • (Object)

    the current value of value



6
7
8
# File 'lib/gitt/models/trailer.rb', line 6

def value
  @value
end

Class Method Details

.for(string, parser: Parsers::Trailer.new) ⇒ Object



7
# File 'lib/gitt/models/trailer.rb', line 7

def self.for(string, parser: Parsers::Trailer.new) = parser.call string

Instance Method Details

#to_sObject



14
# File 'lib/gitt/models/trailer.rb', line 14

def to_s = values.join