Class: Loom::HostSpec
- Inherits:
-
Object
- Object
- Loom::HostSpec
- Extended by:
- Forwardable
- Defined in:
- lib/loom/host_spec.rb
Instance Attribute Summary collapse
-
#disabled ⇒ Object
Returns the value of attribute disabled.
-
#sshkit_host ⇒ Object
readonly
Returns the value of attribute sshkit_host.
Instance Method Summary collapse
-
#initialize(host_string) ⇒ HostSpec
constructor
TODO: change this to take an sshkit_host and make parse public.
- #is_localhost? ⇒ Boolean
- #is_remote? ⇒ Boolean
Constructor Details
#initialize(host_string) ⇒ HostSpec
TODO: change this to take an sshkit_host and make parse public. Stop calling parse from the ctor.
16 17 18 |
# File 'lib/loom/host_spec.rb', line 16 def initialize(host_string) @sshkit_host = parse host_string end |
Instance Attribute Details
#disabled ⇒ Object
Returns the value of attribute disabled.
11 12 13 |
# File 'lib/loom/host_spec.rb', line 11 def disabled @disabled end |
#sshkit_host ⇒ Object (readonly)
Returns the value of attribute sshkit_host.
12 13 14 |
# File 'lib/loom/host_spec.rb', line 12 def sshkit_host @sshkit_host end |
Instance Method Details
#is_localhost? ⇒ Boolean
25 26 27 |
# File 'lib/loom/host_spec.rb', line 25 def is_localhost? hostname == "localhost" && port.nil? && user.nil? end |
#is_remote? ⇒ Boolean
21 22 23 |
# File 'lib/loom/host_spec.rb', line 21 def is_remote? !is_localhost? end |