Class: Capistrano::Doctor::ServersDoctor::ServerDecorator
- Inherits:
-
Object
- Object
- Capistrano::Doctor::ServersDoctor::ServerDecorator
- Defined in:
- lib/capistrano/doctor/servers_doctor.rb
Instance Method Summary collapse
-
#initialize(server) ⇒ ServerDecorator
constructor
A new instance of ServerDecorator.
- #properties ⇒ Object
- #roles ⇒ Object
- #uri_form ⇒ Object
Constructor Details
#initialize(server) ⇒ ServerDecorator
Returns a new instance of ServerDecorator.
65 66 67 |
# File 'lib/capistrano/doctor/servers_doctor.rb', line 65 def initialize(server) @server = server end |
Instance Method Details
#properties ⇒ Object
83 84 85 86 |
# File 'lib/capistrano/doctor/servers_doctor.rb', line 83 def properties return "" unless server.properties.keys.any? pretty_inspect(server.properties.to_h) end |
#roles ⇒ Object
79 80 81 |
# File 'lib/capistrano/doctor/servers_doctor.rb', line 79 def roles server.roles.to_a.inspect end |
#uri_form ⇒ Object
69 70 71 72 73 74 75 76 77 |
# File 'lib/capistrano/doctor/servers_doctor.rb', line 69 def uri_form [ server.user, server.user && "@", server.hostname, server.port && ":", server.port ].compact.join end |