Class: Interface
- Inherits:
-
Object
- Object
- Interface
- Defined in:
- lib/interface.rb
Instance Attribute Summary collapse
-
#link_status ⇒ Object
Returns the value of attribute link_status.
-
#name ⇒ Object
Returns the value of attribute name.
-
#speed ⇒ Object
Returns the value of attribute speed.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(n, lstatus = nil, sp = nil, tp = nil) ⇒ Interface
constructor
A new instance of Interface.
- #to_s ⇒ Object
Constructor Details
#initialize(n, lstatus = nil, sp = nil, tp = nil) ⇒ Interface
Returns a new instance of Interface.
5 6 7 8 9 10 |
# File 'lib/interface.rb', line 5 def initialize (n, lstatus=nil, sp=nil, tp=nil) @name = n @link_status = lstatus @speed = sp @type = tp end |
Instance Attribute Details
#link_status ⇒ Object
Returns the value of attribute link_status.
3 4 5 |
# File 'lib/interface.rb', line 3 def link_status @link_status end |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/interface.rb', line 3 def name @name end |
#speed ⇒ Object
Returns the value of attribute speed.
3 4 5 |
# File 'lib/interface.rb', line 3 def speed @speed end |
#type ⇒ Object
Returns the value of attribute type.
3 4 5 |
# File 'lib/interface.rb', line 3 def type @type end |
Instance Method Details
#to_s ⇒ Object
12 13 14 |
# File 'lib/interface.rb', line 12 def to_s() print "Interface: ", @name, " ", @link_status, " ", @speed, " ", @type, "\n" end |