Completed
Push — master ( fde2ba...d387dd )
by Fike
01:07
created

PublicKey.initialize()   A

Complexity

Conditions 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 5
rs 9.4285
cc 1
1
# frozen_string_literal: true
2
3
# rubocop:disable Style/Documentation
4
5
module AMA
6
  module Chef
7
    module SSHPrivateKeys
8
      module Model
9
        class PublicKey
10
          attr_accessor :type
11
          attr_accessor :content
12
          attr_accessor :comment
13
14
          def initialize(type = nil, content = nil, comment = nil)
15
            @type = type
16
            @content = content
17
            @comment = comment
18
          end
19
20
          def to_s
21
            builder = "#{type} #{content}"
22
            builder += " #{comment}" if comment
23
            builder
24
          end
25
        end
26
      end
27
    end
28
  end
29
end
30