Class: Taketo::Constructs::Server
- Inherits:
-
BaseConstruct
- Object
- BaseConstruct
- Taketo::Constructs::Server
- Defined in:
- lib/taketo/constructs/server.rb
Instance Attribute Summary collapse
-
#default_command ⇒ Object
Returns the value of attribute default_command.
-
#default_location ⇒ Object
Returns the value of attribute default_location.
-
#environment_variables ⇒ Object
readonly
Returns the value of attribute environment_variables.
-
#global_alias ⇒ Object
Returns the value of attribute global_alias.
-
#host ⇒ Object
Returns the value of attribute host.
-
#identity_file ⇒ Object
Returns the value of attribute identity_file.
-
#port ⇒ Object
Returns the value of attribute port.
-
#ssh_command ⇒ Object
Returns the value of attribute ssh_command.
-
#username ⇒ Object
Returns the value of attribute username.
Attributes inherited from BaseConstruct
#default_server_config, #name, #parent
Instance Method Summary collapse
- #env(env_variables) ⇒ Object
-
#initialize(name) ⇒ Server
constructor
A new instance of Server.
- #parent=(parent) ⇒ Object
Methods inherited from BaseConstruct
#node_type, #parents, #path, #qualified_name
Methods included from AssociatedNodes
Constructor Details
#initialize(name) ⇒ Server
Returns a new instance of Server.
12 13 14 15 16 |
# File 'lib/taketo/constructs/server.rb', line 12 def initialize(name) super @environment_variables = {} @ssh_command = :ssh end |
Instance Attribute Details
#default_command ⇒ Object
Returns the value of attribute default_command.
8 9 10 |
# File 'lib/taketo/constructs/server.rb', line 8 def default_command @default_command end |
#default_location ⇒ Object
Returns the value of attribute default_location.
8 9 10 |
# File 'lib/taketo/constructs/server.rb', line 8 def default_location @default_location end |
#environment_variables ⇒ Object (readonly)
Returns the value of attribute environment_variables.
7 8 9 |
# File 'lib/taketo/constructs/server.rb', line 7 def environment_variables @environment_variables end |
#global_alias ⇒ Object
Returns the value of attribute global_alias.
8 9 10 |
# File 'lib/taketo/constructs/server.rb', line 8 def global_alias @global_alias end |
#host ⇒ Object
Returns the value of attribute host.
8 9 10 |
# File 'lib/taketo/constructs/server.rb', line 8 def host @host end |
#identity_file ⇒ Object
Returns the value of attribute identity_file.
8 9 10 |
# File 'lib/taketo/constructs/server.rb', line 8 def identity_file @identity_file end |
#port ⇒ Object
Returns the value of attribute port.
8 9 10 |
# File 'lib/taketo/constructs/server.rb', line 8 def port @port end |
#ssh_command ⇒ Object
Returns the value of attribute ssh_command.
8 9 10 |
# File 'lib/taketo/constructs/server.rb', line 8 def ssh_command @ssh_command end |
#username ⇒ Object
Returns the value of attribute username.
8 9 10 |
# File 'lib/taketo/constructs/server.rb', line 8 def username @username end |
Instance Method Details
#env(env_variables) ⇒ Object
18 19 20 |
# File 'lib/taketo/constructs/server.rb', line 18 def env(env_variables) @environment_variables.merge!(env_variables) end |
#parent=(parent) ⇒ Object
22 23 24 25 |
# File 'lib/taketo/constructs/server.rb', line 22 def parent=(parent) super env(:RAILS_ENV => parent.rails_env) if parent.respond_to?(:rails_env) end |