Class: RemoteExecutor::System
- Inherits:
-
Object
- Object
- RemoteExecutor::System
- Defined in:
- lib/remote_executor/system.rb
Overview
System represents a set of hosts that implement a service
Instance Attribute Summary collapse
-
#environment ⇒ Object
readonly
Returns the value of attribute environment.
-
#hosts ⇒ Object
readonly
Returns the value of attribute hosts.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#user ⇒ Object
readonly
Returns the value of attribute user.
Instance Method Summary collapse
-
#initialize(parameters) ⇒ System
constructor
A new instance of System.
- #to_s ⇒ Object
Constructor Details
#initialize(parameters) ⇒ System
Returns a new instance of System.
17 18 19 20 21 22 23 24 25 |
# File 'lib/remote_executor/system.rb', line 17 def initialize( parameters ) System.validate_parameters( parameters ) @name = parameters[:name] @environment = parameters[:environment] @user = parameters[:user] @hosts = parameters[:hosts] end |
Instance Attribute Details
#environment ⇒ Object (readonly)
Returns the value of attribute environment.
7 8 9 |
# File 'lib/remote_executor/system.rb', line 7 def environment @environment end |
#hosts ⇒ Object (readonly)
Returns the value of attribute hosts.
7 8 9 |
# File 'lib/remote_executor/system.rb', line 7 def hosts @hosts end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
7 8 9 |
# File 'lib/remote_executor/system.rb', line 7 def name @name end |
#user ⇒ Object (readonly)
Returns the value of attribute user.
7 8 9 |
# File 'lib/remote_executor/system.rb', line 7 def user @user end |
Instance Method Details
#to_s ⇒ Object
27 28 29 |
# File 'lib/remote_executor/system.rb', line 27 def to_s "#{@user}\@#{@name}.#{@environment}: #{@hosts.inspect}" end |