class OodCluster::Server
An object that describes a server hosted by a given cluster
Attributes
host[R]
The host information for this server object @example Host information for login node
"my_server.host" #=> "oakley.osc.edu"
@return [String] the host for this server
Public Class Methods
new(host:, **_)
click to toggle source
@param host [#to_s] host of server
# File lib/ood_cluster/server.rb, line 15 def initialize(host:, **_) @host = host.to_s end
Public Instance Methods
==(other)
click to toggle source
The comparison operator @param other [#to_h] object to compare against @return [Boolean] whether objects are equivalent
# File lib/ood_cluster/server.rb, line 28 def ==(other) to_h == other.to_h end
eql?(other)
click to toggle source
Check whether objects are identical to each other @param other [#to_h] object to compare against @return [Boolean] whether objects are identical
# File lib/ood_cluster/server.rb, line 35 def eql?(other) self.class == other.class && self == other end
hash()
click to toggle source
Generate a hash value for this object @return [Fixnum] hash value of object
# File lib/ood_cluster/server.rb, line 41 def hash [self.class, to_h].hash end
to_h()
click to toggle source
Convert object to hash @return [Hash] the hash describing this object
# File lib/ood_cluster/server.rb, line 21 def to_h {host: @host.to_s} end