Sha256: 92022a2c2e97ce138331eb25dccc78a5a07cb9b9fad09c1c96475638328d51c7

Contents?: true

Size: 490 Bytes

Versions: 4

Compression:

Stored size: 490 Bytes

Contents

module WWMD
  class VSStubs::VSValue
    include VSStubHelpers

    attr_accessor :value

    # gin up all the single byte values
    def initialize(str)
      @value = str
    end

    def to_s
      @value.hexify
    end

    def to_sym
      VIEWSTATE_TYPES[opcode].to_sym
    end

    def opcode
      @value
    end

    def serialize
      super # cheat... just return opcode
    end

    def to_xml
      xml = super
      xml.add_text(self.to_sym.to_s)
      xml
    end

  end
end

Version data entries

4 entries across 4 versions & 3 rubygems

Version Path
iZsh-wwmd-0.2.19 lib/wwmd/viewstate/vs_stubs/vs_value.rb
miketracy-wwmd-0.2.17 lib/wwmd/viewstate/vs_stubs/vs_value.rb
miketracy-wwmd-0.2.19 lib/wwmd/viewstate/vs_stubs/vs_value.rb
wwmd-0.2.20.3 lib/wwmd/viewstate/vs_stubs/vs_value.rb