Class: WWMD::VSStubs::VSUnit
- Inherits:
-
Object
- Object
- WWMD::VSStubs::VSUnit
- Includes:
- WWMD::VSStubHelpers
- Defined in:
- lib/wwmd/viewstate/vs_stubs/vs_unit.rb
Instance Attribute Summary collapse
-
#dword ⇒ Object
readonly
Returns the value of attribute dword.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
-
#word ⇒ Object
readonly
Returns the value of attribute word.
Instance Method Summary collapse
-
#initialize(dword, word) ⇒ VSUnit
constructor
A new instance of VSUnit.
- #serialize ⇒ Object
- #to_xml ⇒ Object
Methods included from WWMD::VSStubHelpers
Methods included from WWMD::ViewStateUtils
#deserialize_type, #dlog, #magic?, #next_type, #offset, #putd, #read, #read_7bit_encoded_int, #read_double, #read_int, #read_int32, #read_raw_byte, #read_short, #read_string, #serialize_type, #slog, #throw, #write_7bit_encoded_int, #write_double, #write_int, #write_int32, #write_short
Constructor Details
#initialize(dword, word) ⇒ VSUnit
Returns a new instance of VSUnit.
9 10 11 12 13 |
# File 'lib/wwmd/viewstate/vs_stubs/vs_unit.rb', line 9 def initialize(dword,word) @dword = dword @word = word @value = '' end |
Instance Attribute Details
#dword ⇒ Object (readonly)
Returns the value of attribute dword.
5 6 7 |
# File 'lib/wwmd/viewstate/vs_stubs/vs_unit.rb', line 5 def dword @dword end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
7 8 9 |
# File 'lib/wwmd/viewstate/vs_stubs/vs_unit.rb', line 7 def value @value end |
#word ⇒ Object (readonly)
Returns the value of attribute word.
6 7 8 |
# File 'lib/wwmd/viewstate/vs_stubs/vs_unit.rb', line 6 def word @word end |
Instance Method Details
#serialize ⇒ Object
15 16 17 18 19 20 |
# File 'lib/wwmd/viewstate/vs_stubs/vs_unit.rb', line 15 def serialize stack = super stack << write_double(self.dword) stack << write_single(self.word) return stack end |
#to_xml ⇒ Object
22 23 24 25 26 27 |
# File 'lib/wwmd/viewstate/vs_stubs/vs_unit.rb', line 22 def to_xml xml = super xml.add_attribute("dword",self.dword.to_s) xml.add_attribute("word",self.word.to_s) xml end |