module BackboneGenerator

Namespace for all the classess @since 0.0.3

Namespace for all the classess @since 0.0.3

Namespace for all the classess @since 0.0.3

Namespace for all the classess @since 0.0.3

Namespace for all the classess @since 0.0.3

Namespace for all the classess @since 0.0.3

Namespace for all the classess @since 0.0.3

Namespace for all the classess @since 0.0.3

Namespace for all the classess @since 0.0.3

Namespace for all the classess @since 0.0.3

Namespace for all the classess @since 0.0.3

Constants

VERSION

Public Class Methods

compile_and_copy(source_file, *args) click to toggle source

This code is dummed down version of template_method in the bundler gem. Original version can be found @see github.com/bundler/bundler/blob/master/lib/bundler/vendor/thor/actions/file_manipulation.rb God Bless all the great and awesome people who brought us open source God Bless all the ruby developers out there!

# File lib/backbone_generator/auxilliary.rb, line 17
def compile_and_copy(source_file, *args)
    config = args.last.is_a?(Hash) ? args.pop : {}
    destination = args.first
    context = instance_eval('binding')
    content = ERB.new(::File.binread(source_file)).result(context)
    open(destination, 'w') { |f| f << content }
end
option_details() click to toggle source

Getter for the option_details hash

# File lib/backbone_generator/auxilliary.rb, line 34
def option_details
    @@option_details
end
option_details=(value) click to toggle source

Setter for the option_details hash

# File lib/backbone_generator/auxilliary.rb, line 39
def option_details=(value)
    @@option_details = value
end
post_install_message() click to toggle source
# File lib/backbone_generator/post_install_message.rb, line 3
    def post_install_message
      footer = <<'EOS'

======== Release notes for BackboneGenerator ===========

Thank you very much for downloading the backbone_generator
gem. I would like to hear your feedback on possible bugs
and also potential features that you would like to see in
the next release!

Happy Coding :-)
- Tawheed 

==========================================================

EOS
    end
start_server(port) click to toggle source

Function used to start server

# File lib/backbone_generator/auxilliary.rb, line 26
def start_server(port)
    root = Dir.getwd
    server = WEBrick::HTTPServer.new :Port => port, :DocumentRoot => root
    trap 'INT' do server.shutdown end
    server.start
end