Sha256: d328e98f8b4e8c593990e34afb1c57361634e9cd2493715edca47db2320780ff

Contents?: true

Size: 905 Bytes

Versions: 1

Compression:

Stored size: 905 Bytes

Contents

require "yaml"
require "redcarpet"
require "oj"

require "data_processor/getters"
require "data_processor/import"
require "data_processor/manipulate"
require "data_processor/output"

class DataProcessor
  include DataProcessor::Getters
  include DataProcessor::Import
  include DataProcessor::Manipulate
  include DataProcessor::Output

  def initialize(initial_path="./")
    @data = {}
    @initial_path = initial_path

    create_markdown_parser
  end


  #
  #  Markdown
  #
  def self.markdown_renderer
    Redcarpet::Render::HTML
  end


  def create_markdown_parser
    @markdown_parser = Redcarpet::Markdown.new(
      DataProcessor::markdown_renderer,
      fenced_code_blocks: true,
      strikethrough: true,
      superscript: true,
      underline: true,
      highlight: true,
      smartypants: true
    )
  end


  def parse_markdown(string)
    @markdown_parser.render(string)
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
data_processor-0.1.0 lib/data_processor.rb