Class: Latex::Formatters::CustomFormatter

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby-latex.rb

Instance Method Summary collapse

Constructor Details

#initialize(&block) ⇒ CustomFormatter

Returns a new instance of CustomFormatter.


401
402
403
404
# File 'lib/ruby-latex.rb', line 401

def initialize(&block)
    raise "Block required" unless block_given?
    @block = block
end

Instance Method Details

#call(object) ⇒ Object


406
407
408
# File 'lib/ruby-latex.rb', line 406

def call(object)
    @block.call(object)
end