Class: Postscript::Model::Operators::Container::Anchorsearch
- Inherits:
-
Postscript::Model::Operator
- Object
- Postscript::Model::Operator
- Postscript::Model::Operators::Container::Anchorsearch
- Defined in:
- lib/postscript/model/operators/container.rb
Instance Attribute Summary collapse
-
#pattern ⇒ Object
readonly
Returns the value of attribute pattern.
-
#target ⇒ Object
readonly
Returns the value of attribute target.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(target:, pattern:) ⇒ Anchorsearch
constructor
A new instance of Anchorsearch.
Methods inherited from Postscript::Model::Operator
#accept, #operator?, register_as
Constructor Details
#initialize(target:, pattern:) ⇒ Anchorsearch
Returns a new instance of Anchorsearch.
133 134 135 136 137 |
# File 'lib/postscript/model/operators/container.rb', line 133 def initialize(target:, pattern:) @target = target @pattern = pattern freeze end |
Instance Attribute Details
#pattern ⇒ Object (readonly)
Returns the value of attribute pattern.
132 133 134 |
# File 'lib/postscript/model/operators/container.rb', line 132 def pattern @pattern end |
#target ⇒ Object (readonly)
Returns the value of attribute target.
132 133 134 |
# File 'lib/postscript/model/operators/container.rb', line 132 def target @target end |
Class Method Details
.from_operands(stack) ⇒ Object
138 139 140 141 142 |
# File 'lib/postscript/model/operators/container.rb', line 138 def self.from_operands(stack) pattern = stack.pop target = stack.pop new(target: target, pattern: pattern) end |