class Symgate::Wordlist::GraphicAttachment

contains an embedded wordlist entry graphic

Public Class Methods

from_soap(hash) click to toggle source
# File lib/symgate/wordlist/graphic_attachment.rb, line 8
def self.from_soap(hash)
  data = hash_value_with_optional_namespace(:wl, :data, hash)

  Symgate::Wordlist::GraphicAttachment.new(
    type: hash_value_with_optional_namespace(:wl, :type, hash),
    uuid: hash_value_with_optional_namespace(:wl, :uuid, hash),
    data: data ? Base64.decode64(data) : nil
  )
end

Public Instance Methods

to_s() click to toggle source
# File lib/symgate/wordlist/graphic_attachment.rb, line 26
def to_s
  "{#{@type} Attachment: #{@uuid} (#{@data.length} bytes)}"
end
to_soap() click to toggle source
# File lib/symgate/wordlist/graphic_attachment.rb, line 18
def to_soap
  {
    :wl:type => @type,
    :wl:uuid => @uuid,
    :wl:data => @data ? Base64.encode64(@data) : nil
  }
end

Protected Instance Methods

attributes() click to toggle source
# File lib/symgate/wordlist/graphic_attachment.rb, line 32
def attributes
  %i[type uuid data]
end