Class: WWMD::VSStubs::VSTriplet

Inherits:
Object
  • Object
show all
Includes:
WWMD::VSStubHelpers
Defined in:
lib/wwmd/viewstate/vs_stubs/vs_triplet.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from WWMD::VSStubHelpers

#opcode, #size, #to_sym

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(obj1, obj2, obj3) ⇒ VSTriplet

Returns a new instance of VSTriplet.



7
8
9
10
11
12
# File 'lib/wwmd/viewstate/vs_stubs/vs_triplet.rb', line 7

def initialize(obj1,obj2,obj3)
  @value = []
  @value << obj1
  @value << obj2
  @value << obj3
end

Instance Attribute Details

#valueObject

Returns the value of attribute value.



5
6
7
# File 'lib/wwmd/viewstate/vs_stubs/vs_triplet.rb', line 5

def value
  @value
end

Instance Method Details

#serializeObject



14
15
16
17
18
19
20
# File 'lib/wwmd/viewstate/vs_stubs/vs_triplet.rb', line 14

def serialize
  stack = super
  self.value.each do |v|
    stack << v.serialize
  end
  return stack
end

#to_xmlObject



22
23
24
25
26
27
28
# File 'lib/wwmd/viewstate/vs_stubs/vs_triplet.rb', line 22

def to_xml
  xml = super
  self.value.each do |v|
    xml.add_element(v.to_xml)
  end
  xml
end