Class: Interface

Inherits:
Object
  • Object
show all
Defined in:
lib/interface.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

Returns the value of attribute link_status.



3
4
5
# File 'lib/interface.rb', line 3

def link_status
  @link_status
end

#nameObject

Returns the value of attribute name.



3
4
5
# File 'lib/interface.rb', line 3

def name
  @name
end

#speedObject

Returns the value of attribute speed.



3
4
5
# File 'lib/interface.rb', line 3

def speed
  @speed
end

#typeObject

Returns the value of attribute type.



3
4
5
# File 'lib/interface.rb', line 3

def type
  @type
end

Instance Method Details

#to_sObject



12
13
14
# File 'lib/interface.rb', line 12

def to_s()
	print "Interface: ", @name, " ", @link_status, " ", @speed, " ", @type, "\n"
end