Class: LogSimulator::Target
- Inherits:
-
Object
- Object
- LogSimulator::Target
- Defined in:
- lib/resolve.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#port ⇒ Object
Returns the value of attribute port.
-
#target_name ⇒ Object
Returns the value of attribute target_name.
Instance Method Summary collapse
- #==(o) ⇒ Object
- #eql?(o) ⇒ Boolean
- #hash ⇒ Object
-
#initialize(name, target_name, port) ⇒ Target
constructor
A new instance of Target.
Constructor Details
#initialize(name, target_name, port) ⇒ Target
Returns a new instance of Target.
10 11 12 13 14 |
# File 'lib/resolve.rb', line 10 def initialize(name,target_name,port) @name = name @target_name = target_name @port = port end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
8 9 10 |
# File 'lib/resolve.rb', line 8 def name @name end |
#port ⇒ Object
Returns the value of attribute port.
8 9 10 |
# File 'lib/resolve.rb', line 8 def port @port end |
#target_name ⇒ Object
Returns the value of attribute target_name.
8 9 10 |
# File 'lib/resolve.rb', line 8 def target_name @target_name end |
Instance Method Details
#==(o) ⇒ Object
20 21 22 |
# File 'lib/resolve.rb', line 20 def ==(o) o.class == self.class && o.target_name == @target_name && o.port == @port end |
#eql?(o) ⇒ Boolean
16 17 18 |
# File 'lib/resolve.rb', line 16 def eql?(o) self == o end |
#hash ⇒ Object
24 25 26 |
# File 'lib/resolve.rb', line 24 def hash @target_name.hash end |