Class: Devup::PortMapping
- Inherits:
-
Object
- Object
- Devup::PortMapping
- Defined in:
- lib/devup/port_mapping.rb
Instance Attribute Summary collapse
-
#from ⇒ Object
readonly
Returns the value of attribute from.
-
#to ⇒ Object
readonly
Returns the value of attribute to.
Instance Method Summary collapse
- #==(another) ⇒ Object
-
#initialize(from, to) ⇒ PortMapping
constructor
A new instance of PortMapping.
Constructor Details
#initialize(from, to) ⇒ PortMapping
Returns a new instance of PortMapping.
3 4 5 6 |
# File 'lib/devup/port_mapping.rb', line 3 def initialize(from, to) @from = from @to = to end |
Instance Attribute Details
#from ⇒ Object (readonly)
Returns the value of attribute from.
8 9 10 |
# File 'lib/devup/port_mapping.rb', line 8 def from @from end |
#to ⇒ Object (readonly)
Returns the value of attribute to.
8 9 10 |
# File 'lib/devup/port_mapping.rb', line 8 def to @to end |
Instance Method Details
#==(another) ⇒ Object
10 11 12 |
# File 'lib/devup/port_mapping.rb', line 10 def ==(another) @from == another.from && @to == another.to end |