Sha256: f3541f6073ac3b87f41c070fb52595b5a250602e5cb599a78d6e1b844089cf51

Contents?: true

Size: 469 Bytes

Versions: 5

Compression:

Stored size: 469 Bytes

Contents

module WWMD
  # gin up all the single byte values
  class VSValue < VSClassHelpers
    attr_accessor :value

    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

5 entries across 5 versions & 1 rubygems

Version Path
miketracy-wwmd-0.2.11 lib/wwmd/viewstate/vs_value.rb
miketracy-wwmd-0.2.12 lib/wwmd/viewstate/vs_value.rb
miketracy-wwmd-0.2.14 lib/wwmd/viewstate/vs_value.rb
miketracy-wwmd-0.2.15 lib/wwmd/viewstate/vs_value.rb
miketracy-wwmd-0.2.16 lib/wwmd/viewstate/vs_value.rb