Class: Pslm::LatexOutputter::SkipVersesFormatter

Inherits:
Formatter
  • Object
show all
Defined in:
lib/pslm/latexoutputter.rb

Overview

skips verses at the beginning

Instance Method Summary collapse

Methods inherited from Formatter

format, #part_format, #psalm_format, #strophe_format, #syllable_format, #word_format

Constructor Details

#initialize(options) ⇒ SkipVersesFormatter

Returns a new instance of SkipVersesFormatter.



337
338
339
340
# File 'lib/pslm/latexoutputter.rb', line 337

def initialize(options)
  super(options)
  @skip_verses = @options # takes just one number as a parameter
end

Instance Method Details

#verse_format(text, verse, strophe, psalm) ⇒ Object



342
343
344
345
346
347
348
349
350
# File 'lib/pslm/latexoutputter.rb', line 342

def verse_format(text, verse, strophe, psalm)
  #super(text, psalm, verse)
  @verse_counter += 1
  if @verse_counter <= @skip_verses then
    return ""
  end

  return text
end