Class: Postsvg::Model::UnknownOperator

Inherits:
Operator
  • Object
show all
Defined in:
lib/postsvg/model/operators.rb

Overview

Wrapper for operator tokens with no registered class. Carries the original keyword so the visitor can emit a comment / warn.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Operator

#accept, #operator?, register_as

Constructor Details

#initialize(keyword:) ⇒ UnknownOperator

Returns a new instance of UnknownOperator.



62
63
64
65
# File 'lib/postsvg/model/operators.rb', line 62

def initialize(keyword:)
  @keyword = keyword
  freeze
end

Instance Attribute Details

#keywordObject (readonly)

Returns the value of attribute keyword.



60
61
62
# File 'lib/postsvg/model/operators.rb', line 60

def keyword
  @keyword
end

Class Method Details

.from_operands(_stack) ⇒ Object



69
# File 'lib/postsvg/model/operators.rb', line 69

def self.from_operands(_stack); end

Instance Method Details

#visit_nameObject



67
# File 'lib/postsvg/model/operators.rb', line 67

def visit_name = "unknown"