Class: PDF::Core::NameTree::Value
- Inherits:
-
Object
- Object
- PDF::Core::NameTree::Value
- Includes:
- Comparable
- Defined in:
- lib/pdf/core/name_tree.rb
Overview
:nodoc:
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
- #<=>(other) ⇒ Object
-
#initialize(name, value) ⇒ Value
constructor
A new instance of Value.
- #inspect ⇒ Object
- #to_s ⇒ Object
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
#name ⇒ Object (readonly)
Returns the value of attribute name.
159 160 161 |
# File 'lib/pdf/core/name_tree.rb', line 159 def name @name end |
#value ⇒ Object (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 |
#inspect ⇒ Object
171 172 173 |
# File 'lib/pdf/core/name_tree.rb', line 171 def inspect "#<Value: #{name.inspect} : #{value.inspect}>" end |
#to_s ⇒ Object
175 176 177 |
# File 'lib/pdf/core/name_tree.rb', line 175 def to_s "#{name} : #{value}" end |