Class: HexaPDF::Content::Operator::NoArgumentOperator
- Inherits:
-
BaseOperator
- Object
- BaseOperator
- HexaPDF::Content::Operator::NoArgumentOperator
- Defined in:
- lib/hexapdf/content/operator.rb
Overview
A specialized operator class for operators that take no arguments. Provides an optimized #serialize method.
Direct Known Subclasses
BeginText, ClipPath, EndPath, EndText, MoveTextNextLine, RestoreGraphicsState, SaveGraphicsState
Instance Attribute Summary
Attributes inherited from BaseOperator
Instance Method Summary collapse
-
#initialize(name) ⇒ NoArgumentOperator
constructor
:nodoc:.
-
#invoke(_processor) ⇒ Object
:nodoc:.
-
#serialize(_serializer) ⇒ Object
An optimized version of the serialization algorithm.
Constructor Details
#initialize(name) ⇒ NoArgumentOperator
:nodoc:
117 118 119 120 |
# File 'lib/hexapdf/content/operator.rb', line 117 def initialize(name) #:nodoc: super(name) @serialized = "#{name}\n" end |
Instance Method Details
#invoke(_processor) ⇒ Object
:nodoc:
122 123 |
# File 'lib/hexapdf/content/operator.rb', line 122 def invoke(_processor) # :nodoc: end |
#serialize(_serializer) ⇒ Object
An optimized version of the serialization algorithm.
See: BaseOperator#serialize
128 129 130 |
# File 'lib/hexapdf/content/operator.rb', line 128 def serialize(_serializer) @serialized end |