| Total Complexity | 3 |
| Total Lines | 17 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | # frozen_string_literal: true |
||
| 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 |
||
| 30 |