Sha256: b01fc7884ceff5fc55e607fe450d5c2891185ea3c7dce472a9b06da6bcf5b724

Contents?: true

Size: 716 Bytes

Versions: 1

Compression:

Stored size: 716 Bytes

Contents

require 'json'
require 'nokogiri'
require 'erb'
require 'fileutils'

module DashcodeConverter
  
  JSON_PARAMS= {
    :indent=> "  ",
    :object_nl=> "\n",
    :array_nl=> "\n",
    :space=> " "
  }
  
  INDENT= "    "
  
end

class JavascriptCode < String
  def to_json(*options)
    self
  end
end

module Kernel
  # A convenience factory method
  def JavascriptCode(str)
    JavascriptCode.new(str)
  end
end

class String
  def remove_indent
    match= self.match(/(^\s+)/)
    return self unless match
    self.gsub(/^#{match[1]}/, '').strip
  end
  def indent(str)
    self.gsub(/^/, str)
  end
end

require 'dashcode-converter/controller'
require 'dashcode-converter/nib'
require 'dashcode-converter/project'

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
dashcode-converter-0.0.1 lib/dashcode-converter.rb