class HexaPDF::Content::NamedValue
Associates a name with a value, used by various graphics state parameters.
Attributes
name[R]
The name for the value.
value[R]
The value itself.
Public Class Methods
new(name, value)
click to toggle source
Creates a new NamedValue
object and freezes it.
# File lib/hexapdf/content/graphics_state.rb, line 54 def initialize(name, value) @name = name @value = value freeze end
Public Instance Methods
==(other)
click to toggle source
The object is equal to other
if either the name or the value is equal to other
, or if the other object is a NamedValue
object with the same name and value.
# File lib/hexapdf/content/graphics_state.rb, line 62 def ==(other) @name == other || @value == other || (other.kind_of?(NamedValue) && @name == other.name && @value == other.value) end
to_operands()
click to toggle source
Returns the value.
# File lib/hexapdf/content/graphics_state.rb, line 68 def to_operands @value end