Class: OpenFlow::Protocol::SuperclassBase
- Inherits:
-
BinData::Record
- Object
- BinData::Record
- OpenFlow::Protocol::SuperclassBase
show all
- Defined in:
- lib/openflow-protocol/helpers/superclass_base.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
Instance Attribute Details
#type_str ⇒ Object
Returns the value of attribute type_str.
6
7
8
|
# File 'lib/openflow-protocol/helpers/superclass_base.rb', line 6
def type_str
@type_str
end
|
Instance Method Details
#body_length ⇒ Object
21
22
23
|
# File 'lib/openflow-protocol/helpers/superclass_base.rb', line 21
def body_length
0
end
|
#initialize_instance ⇒ Object
10
11
12
13
14
15
16
17
18
19
|
# File 'lib/openflow-protocol/helpers/superclass_base.rb', line 10
def initialize_instance
super
name = self.class.name.split('::').last
if name[0..5] == 'Action'
name = name[6..-1]
elsif name[0..12] == 'QueueProperty'
name = name[13..-1]
end
@type_str = name.gsub(/([A-Z])/, '_\1')[1..-1].downcase
end
|