Class: EideticPDF::PdfObjects::PdfName
- Inherits:
-
Object
- Object
- EideticPDF::PdfObjects::PdfName
- Defined in:
- lib/epdfo.rb
Overview
name of PDF entity, written as /Name
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Class Method Summary collapse
Instance Method Summary collapse
- #==(other) ⇒ Object
- #eql?(other) ⇒ Boolean
- #hash ⇒ Object
-
#initialize(name) ⇒ PdfName
constructor
A new instance of PdfName.
- #to_s ⇒ Object
Constructor Details
#initialize(name) ⇒ PdfName
Returns a new instance of PdfName.
203 204 205 |
# File 'lib/epdfo.rb', line 203 def initialize(name) @name = name.to_s end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
201 202 203 |
# File 'lib/epdfo.rb', line 201 def name @name end |
Class Method Details
Instance Method Details
#==(other) ⇒ Object
219 220 221 |
# File 'lib/epdfo.rb', line 219 def ==(other) other.respond_to?(:name) && self.name == other.name end |
#eql?(other) ⇒ Boolean
215 216 217 |
# File 'lib/epdfo.rb', line 215 def eql?(other) self.name.eql?(other.name) end |
#hash ⇒ Object
211 212 213 |
# File 'lib/epdfo.rb', line 211 def hash self.to_s.hash end |
#to_s ⇒ Object
207 208 209 |
# File 'lib/epdfo.rb', line 207 def to_s "/#{name} " end |