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.
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
#name ⇒ Object (readonly)
Returns the value of attribute name.
158 159 160 |
# File 'lib/pdf/core/name_tree.rb', line 158 def name @name end |
#value ⇒ Object (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 |
#inspect ⇒ Object
170 171 172 |
# File 'lib/pdf/core/name_tree.rb', line 170 def inspect "#<Value: #{name.inspect} : #{value.inspect}>" end |
#to_s ⇒ Object
174 175 176 |
# File 'lib/pdf/core/name_tree.rb', line 174 def to_s "#{name} : #{value}" end |