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.
147 148 149 |
# File 'lib/prawn/core/name_tree.rb', line 147 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.
144 145 146 |
# File 'lib/prawn/core/name_tree.rb', line 144 def name @name end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
145 146 147 |
# File 'lib/prawn/core/name_tree.rb', line 145 def value @value end |
Instance Method Details
#<=>(leaf) ⇒ Object
151 152 153 |
# File 'lib/prawn/core/name_tree.rb', line 151 def <=>(leaf) name <=> leaf.name end |
#inspect ⇒ Object
155 156 157 |
# File 'lib/prawn/core/name_tree.rb', line 155 def inspect "#<Value: #{name.inspect} : #{value.inspect}>" end |
#to_s ⇒ Object
159 160 161 |
# File 'lib/prawn/core/name_tree.rb', line 159 def to_s "#{name} : #{value}" end |