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

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

Overview

:nodoc:

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, value) ⇒ Value

Returns a new instance of Value.



159
160
161
# File 'lib/pdf/core/name_tree.rb', line 159

def initialize(name, value)
  @name, @value = PDF::Core::LiteralString.new(name), value
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



156
157
158
# File 'lib/pdf/core/name_tree.rb', line 156

def name
  @name
end

#valueObject (readonly)

Returns the value of attribute value.



157
158
159
# File 'lib/pdf/core/name_tree.rb', line 157

def value
  @value
end

Instance Method Details

#<=>(leaf) ⇒ Object



163
164
165
# File 'lib/pdf/core/name_tree.rb', line 163

def <=>(leaf)
  name <=> leaf.name
end

#inspectObject



167
168
169
# File 'lib/pdf/core/name_tree.rb', line 167

def inspect
  "#<Value: #{name.inspect} : #{value.inspect}>"
end

#to_sObject



171
172
173
# File 'lib/pdf/core/name_tree.rb', line 171

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