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)


215
216
217
218
# File 'lib/pdf/core/name_tree.rb', line 215

def initialize(name, value)
  @name = PDF::Core::LiteralString.new(name)
  @value = value
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)


208
209
210
# File 'lib/pdf/core/name_tree.rb', line 208

def name
  @name
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)


211
212
213
# File 'lib/pdf/core/name_tree.rb', line 211

def value
  @value
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


224
225
226
# File 'lib/pdf/core/name_tree.rb', line 224

def <=>(other)
  name <=> other.name
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



230
231
232
# File 'lib/pdf/core/name_tree.rb', line 230

def inspect
  "#<Value: #{name.inspect} : #{value.inspect}>"
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



235
236
237
# File 'lib/pdf/core/name_tree.rb', line 235

def to_s
  "#{name} : #{value}"
end