Class: BusFactor::Result

Inherits:
Struct
  • Object
show all
Defined in:
lib/bus_factor.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#emailsObject

Returns the value of attribute emails

Returns:

  • (Object)

    the current value of emails



9
10
11
# File 'lib/bus_factor.rb', line 9

def emails
  @emails
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



9
10
11
# File 'lib/bus_factor.rb', line 9

def name
  @name
end

Instance Method Details

#to_s(length_chars: 2, spec_chars: 15) ⇒ Object



10
11
12
13
14
15
16
17
18
# File 'lib/bus_factor.rb', line 10

def to_s(length_chars: 2, spec_chars:15)
  fs = "%#{length_chars}s, %#{spec_chars}s: %s"
  format(
    fs,
    emails.length,
    name,
    emails.join(', ')
  )
end