class Axlsx::Cfvo

Conditional Format Value Object Describes the values of the interpolation points in a gradient scale. This object is used by ColorScale, DataBar and IconSet classes

@note The recommended way to manage these rules is via Worksheet#add_conditional_formatting @see Worksheet#add_conditional_formatting @see ConditionalFormattingRule#initialize

Attributes

gte[R]

Type (xsd:boolean) For icon sets, determines whether this threshold value uses the greater than or equal to operator. 0 indicates ‘greater than’ is used instead of ‘greater than or equal to’. The default value is true @return [Boolean]

type[R]

Type (ST_CfvoType) The type of this conditional formatting value object. options are num, percent, max, min, formula and percentile @return [Symbol]

val[R]

Type (ST_Xstring) The value of the conditional formatting object This library will accept any value so long as it supports to_s

Public Class Methods

new(options={}) click to toggle source

Creates a new Cfvo object @option options [Symbol] type The type of conditional formatting value object @option options [Boolean] gte threshold value usage indicator @option options [String] val The value of the conditional formatting object

# File lib/axlsx/workbook/worksheet/cfvo.rb, line 18
def initialize(options={})
  @gte = true
  parse_options options
end

Public Instance Methods

gte=(v) click to toggle source

@see gte

# File lib/axlsx/workbook/worksheet/cfvo.rb, line 45
def gte=(v); Axlsx::validate_boolean(v); @gte = v end
to_xml_string(str = '') click to toggle source

serialize the Csvo object @param [String] str @return [String]

# File lib/axlsx/workbook/worksheet/cfvo.rb, line 56
def to_xml_string(str = '')
  serialized_tag('cfvo', str)
end
type=(v) click to toggle source

@see type

# File lib/axlsx/workbook/worksheet/cfvo.rb, line 42
def type=(v); Axlsx::validate_conditional_formatting_value_object_type(v); @type = v end
val=(v) click to toggle source

@see val

# File lib/axlsx/workbook/worksheet/cfvo.rb, line 48
def val=(v)
  raise ArgumentError, "#{v.inspect} must respond to to_s" unless v.respond_to?(:to_s)
  @val = v.to_s
end