class Lookbook::CodeBeautifier

def call

def call
  language = opts.fetch(:language, "html")
  stripped_source = source.strip
  result = (language.downcase == "html") ? HtmlBeautifier.beautify(stripped_source, opts) : stripped_source
  result.to_s.strip.html_safe
rescue
  source.strip.html_safe
end

def initialize(source, opts = {})

def initialize(source, opts = {})
  @source = source.to_s
  @opts = opts
end