Class: Lydown::Rendering::SourceRef

Inherits:
Base
  • Object
show all
Defined in:
lib/lydown/rendering/source_ref.rb

Overview

SourceRef does nothing, it’s only there to provide line, column references for notes in a macro group

Instance Method Summary collapse

Methods inherited from Base

#find_prev_event, #initialize, #next_event, #prev_event

Constructor Details

This class inherits a constructor from Lydown::Rendering::Base

Instance Method Details

#translateObject



5
6
7
8
9
10
11
12
13
14
# File 'lib/lydown/rendering/source_ref.rb', line 5

def translate
  fn = @event[:filename]
  if fn && fn != @context['process/last_filename']
    @context['process/last_filename'] = fn

    return # unless @context['options/proof_mode']

    @context.emit(@event[:stream] || :music, "%{::#{File.expand_path(fn)}%} ")
  end
end