Sha256: 415ac1286bd8daa8c1e1de57699c941d78f47d87d1664553c25ecf1b3645a2f4

Contents?: true

Size: 849 Bytes

Versions: 3

Compression:

Stored size: 849 Bytes

Contents

require 'rubygems'
require 'active_support'
require 'erb'
require 'ostruct'
if Gem.available? "json" 
  gem "json", ">= 1.1.3"
else
  gem "json_pure", ">= 1.1.3"
end
module Erlapi
  require 'erlapi/helpers'
  require 'erlapi/templatable'
  
  require 'erlapi/parser'
  require 'erlapi/generator'
  
  class Cmd
    class << self
      def start!(options)
        if !options[:source_dir] || !options[:output_dir]
          raise "You must define source and output dirs"
        end
        
        pa = Erlapi::Parser::Base.new(options[:source_dir])

        pa.parse

        ge = Erlapi::Generator.new(:data => pa.modules, :output_dir => options[:output_dir])

        options = OpenStruct.new( {:charset => 'utf-8', :title => 'Erlang API'})
        ge.generate(options)
        
        puts 'Generating completed'
      end
    end
  end
  
end

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
prepor-erlapi-0.1.8 lib/erlapi.rb
prepor-erlapi-0.1.9 lib/erlapi.rb
erlapi-0.1.9 lib/erlapi.rb