Module: Hecks::IR::Emits

Defined in:
lib/hecks/ir.rb

Instance Method Summary collapse

Instance Method Details

#to_hObject

Raises:



96
97
98
99
100
101
# File 'lib/hecks/ir.rb', line 96

def to_h
  spec = ir_spec_for(self)
  raise Undeclared, "#{self} emits IR but never declared its shape with emits_ir" unless spec

  spec.to_h { |key, rule| [key, emit(rule)] }
end