Class: Prawn::Core::NameTree::Value
- Inherits:
-
Object
- Object
- Prawn::Core::NameTree::Value
- Includes:
- Comparable
- Defined in:
- lib/prawn/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
- #<=>(leaf) ⇒ 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.
159 160 161 |
# File 'lib/prawn/core/name_tree.rb', line 159 def initialize(name, value) @name, @value = Prawn::Core::LiteralString.new(name), value end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
156 157 158 |
# File 'lib/prawn/core/name_tree.rb', line 156 def name @name end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
157 158 159 |
# File 'lib/prawn/core/name_tree.rb', line 157 def value @value end |
Instance Method Details
#<=>(leaf) ⇒ Object
163 164 165 |
# File 'lib/prawn/core/name_tree.rb', line 163 def <=>(leaf) name <=> leaf.name end |
#inspect ⇒ Object
167 168 169 |
# File 'lib/prawn/core/name_tree.rb', line 167 def inspect "#<Value: #{name.inspect} : #{value.inspect}>" end |
#to_s ⇒ Object
171 172 173 |
# File 'lib/prawn/core/name_tree.rb', line 171 def to_s "#{name} : #{value}" end |