Class: Rays::Server::BaseServer
- Inherits:
-
Object
- Object
- Rays::Server::BaseServer
- Defined in:
- lib/rays/servers/base.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #host ⇒ Object
-
#initialize(name, host, remote, java_home = nil, java_cmd = nil) ⇒ BaseServer
constructor
A new instance of BaseServer.
- #java_cmd ⇒ Object
- #java_home ⇒ Object
- #remote ⇒ Object
- #remote? ⇒ Boolean
Constructor Details
#initialize(name, host, remote, java_home = nil, java_cmd = nil) ⇒ BaseServer
Returns a new instance of BaseServer.
29 30 31 32 33 34 35 36 |
# File 'lib/rays/servers/base.rb', line 29 def initialize(name, host, remote, java_home=nil, java_cmd=nil) @name = name @host = host @remote = remote @java_home = java_home @java_cmd = java_cmd default end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
27 28 29 |
# File 'lib/rays/servers/base.rb', line 27 def name @name end |
Instance Method Details
#host ⇒ Object
38 39 40 41 |
# File 'lib/rays/servers/base.rb', line 38 def host raise RaysException.new(missing_environment_option(@name, 'host')) if @host.nil? @host end |
#java_cmd ⇒ Object
48 49 50 51 |
# File 'lib/rays/servers/base.rb', line 48 def java_cmd raise RaysException.new(missing_environment_option(@name, 'java command')) if @java_cmd.nil? @java_cmd end |
#java_home ⇒ Object
43 44 45 46 |
# File 'lib/rays/servers/base.rb', line 43 def java_home raise RaysException.new(missing_environment_option(@name, 'java home')) if @java_home.nil? @java_home end |
#remote ⇒ Object
57 58 59 60 |
# File 'lib/rays/servers/base.rb', line 57 def remote raise RaysException.new(missing_environment_option(@name, 'remote access')) if @remote.nil? @remote end |
#remote? ⇒ Boolean
53 54 55 |
# File 'lib/rays/servers/base.rb', line 53 def remote? !@remote.nil? end |