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.



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

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

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



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

def name
  @name
end

#valueObject (readonly)

Returns the value of attribute value.



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

def value
  @value
end

Instance Method Details

#<=>(other) ⇒ Object



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

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

#inspectObject



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

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

#to_sObject



175
176
177
# File 'lib/pdf/core/name_tree.rb', line 175

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