Class: Latex::Formatters::CustomFormatter
- Inherits:
-
Object
- Object
- Latex::Formatters::CustomFormatter
- Defined in:
- lib/ruby-latex.rb
Instance Method Summary collapse
- #call(object) ⇒ Object
-
#initialize(&block) ⇒ CustomFormatter
constructor
A new instance of CustomFormatter.
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 |