Class: Markup::Rails::Processors::Pandoc

Inherits:
Base
  • Object
show all
Defined in:
lib/markup/rails/processors/pandoc.rb

Instance Attribute Summary

Attributes inherited from Base

#options, #string

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Markup::Rails::Processors::Base

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(m, *args, &block) ⇒ Object



8
9
10
11
12
13
14
# File 'lib/markup/rails/processors/pandoc.rb', line 8

def method_missing(m, *args, &block)
  if supported_outputs.include?(m)
    processor.send(m, *args, &block)
  else
    super
  end
end

Instance Method Details

#to_json(*args, &block) ⇒ Object

We need to explicitly define to_json because it is already defined by rails.



18
19
20
# File 'lib/markup/rails/processors/pandoc.rb', line 18

def to_json(*args, &block)
  processor.to_json(*args, &block)
end