Class: HexaPDF::Content::Operator::NoArgumentOperator

Inherits:
BaseOperator
  • Object
show all
Defined in:
lib/hexapdf/content/operator.rb

Overview

A specialized operator class for operators that take no arguments. Provides an optimized #serialize method.

Instance Attribute Summary

Attributes inherited from BaseOperator

#name

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ NoArgumentOperator

:nodoc:



119
120
121
122
# File 'lib/hexapdf/content/operator.rb', line 119

def initialize(name) #:nodoc:
  super(name)
  @serialized = "#{name}\n"
end

Instance Method Details

#invoke(_processor) ⇒ Object

:nodoc:



124
125
# File 'lib/hexapdf/content/operator.rb', line 124

def invoke(_processor) # :nodoc:
end

#serialize(_serializer) ⇒ Object

An optimized version of the serialization algorithm.

See: BaseOperator#serialize



130
131
132
# File 'lib/hexapdf/content/operator.rb', line 130

def serialize(_serializer)
  @serialized
end