Class: TCWrapper::Class
- Inherits:
-
Wrapper
- Object
- Wrapper
- TCWrapper::Class
- Defined in:
- lib/distem/wrapper/tc/class.rb
Direct Known Subclasses
Constant Summary
- WTYPE =
"class"
Constants inherited from Wrapper
Instance Attribute Summary (collapse)
-
- (Object) id
readonly
Returns the value of attribute id.
-
- (Object) parentid
readonly
Returns the value of attribute parentid.
Instance Method Summary (collapse)
- - (Object) get_cmd(*args)
-
- (Class) initialize(iface, parent, type, params)
constructor
A new instance of Class.
Methods inherited from Wrapper
Constructor Details
- (Class) initialize(iface, parent, type, params)
Returns a new instance of Class
9 10 11 12 13 14 |
# File 'lib/distem/wrapper/tc/class.rb', line 9 def initialize(iface,parent,type,params) super(iface,WTYPE,type,params) @parent = parent @id = Id.new(@parent.id.major,@parent.id.next_minor_id) @parentid = @parent.id end |
Instance Attribute Details
- (Object) id (readonly)
Returns the value of attribute id
7 8 9 |
# File 'lib/distem/wrapper/tc/class.rb', line 7 def id @id end |
- (Object) parentid (readonly)
Returns the value of attribute parentid
7 8 9 |
# File 'lib/distem/wrapper/tc/class.rb', line 7 def parentid @parentid end |
Instance Method Details
- (Object) get_cmd(*args)
16 17 18 19 20 21 22 23 |
# File 'lib/distem/wrapper/tc/class.rb', line 16 def get_cmd(*args) if (@parent.kind_of? QdiscRoot) raise "Can't link a class to root directly" end super(*args) + "parent " + @parentid.to_s + " classid " + @id.to_s + " " \ + @type + " " + get_params end |