Module: Hecks::Runtime::Interpreting
- Included in:
- CommandInterpreter, EntityInterpreter, PortOperationInterpreter
- Defined in:
- lib/hecks/runtime/interpreting.rb
Overview
What every stepwise interpreter shares: the traced step, and the coercion of a command's declared arguments. Two copies of each lived in CommandInterpreter and EntityInterpreter, where they could only ever drift.
Class Method Summary collapse
-
.included(interpreter) ⇒ Object
Each including interpreter gets its own
trace— set by a spec to observe dispatch order (Vocabulary::AggregateDispatchOrder and Vocabulary::EntityDispatchOrder in language/bluebook/vocabulary.bluebook); nil in production, always — one array push and a nil check per step is the entire cost of leaving this in.
Class Method Details
.included(interpreter) ⇒ Object
Each including interpreter gets its own trace — set by a spec to
observe dispatch order (Vocabulary::AggregateDispatchOrder and
Vocabulary::EntityDispatchOrder in language/bluebook/vocabulary.bluebook);
nil in production, always — one array push and a nil check per step
is the entire cost of leaving this in.
15 16 17 |
# File 'lib/hecks/runtime/interpreting.rb', line 15 def self.included(interpreter) interpreter.singleton_class.attr_accessor :trace end |