Sha256: 211e5554b4a49993f20e81f0d2ff8c4ed03c848f3b1baa6995af51766e9408a1
Contents?: true
Size: 697 Bytes
Versions: 5
Compression:
Stored size: 697 Bytes
Contents
# frozen_string_literal: true module Axlsx # This class specifies data for a particular data point. class StrVal include Axlsx::OptionsParser # creates a new StrVal object # @option options [String] v def initialize(options = {}) @v = "" @idx = 0 parse_options options end # a string value. # @return [String] attr_reader :v # @see v def v=(v) @v = v.to_s end # serialize the object def to_xml_string(idx, str = +'') Axlsx.validate_unsigned_int(idx) unless v.to_s.empty? str << '<c:pt idx="' << idx.to_s << '"><c:v>' << ::CGI.escapeHTML(v.to_s) << '</c:v></c:pt>' end end end end
Version data entries
5 entries across 5 versions & 2 rubygems