Class: PDF::Core::NameTree::Value Private

Inherits:
Object
  • Object
show all
Includes:
Comparable
Defined in:
lib/pdf/core/name_tree.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Name Tree value

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, value) ⇒ Value

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Value.

Parameters:

  • name (String)
  • value (any)
Source Code
lib/pdf/core/name_tree.rb, line 215
215
def initialize(name, value)
216
  @name = PDF::Core::LiteralString.new(name)
217
  @value = value
218
end

Instance Attribute Details

#nameString (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (String)
Source Code
lib/pdf/core/name_tree.rb, line 208
208
def name
209
  @name
210
end

#valueany (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (any)
Source Code
lib/pdf/core/name_tree.rb, line 211
211
def value
212
  @value
213
end

Instance Method Details

#<=>(other) ⇒ -1, ...

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Parameters:

Returns:

  • (-1, 0, 1)

See Also:

  • Object#<=>
  • Enumerable
Source Code
lib/pdf/core/name_tree.rb, line 224
224
def <=>(other)
225
  name <=> other.name
226
end

#inspectString

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a string containing a human-readable representation of this value object.

Returns:

  • (String)

    a string containing a human-readable representation of this value object

Source Code
lib/pdf/core/name_tree.rb, line 230
230
def inspect
231
  "#<Value: #{name.inspect} : #{value.inspect}>"
232
end

#to_sString

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a string representation of this value.

Returns:

  • (String)

    a string representation of this value

Source Code
lib/pdf/core/name_tree.rb, line 235
235
def to_s
236
  "#{name} : #{value}"
237
end