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.



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

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

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



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

def name
  @name
end

#valueObject (readonly)

Returns the value of attribute value.



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

def value
  @value
end

Instance Method Details

#<=>(other) ⇒ Object



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

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

#inspectObject



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

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

#to_sObject



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

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