Sha256: 42b0b5c40a90e5e647d64d3a9a74514086370a0f74b6c8f5576f41dd21cc3fbc

Contents?: true

Size: 447 Bytes

Versions: 3

Compression:

Stored size: 447 Bytes

Contents

class Generator
  attr_accessor :root_dir  # this is the directory in which the app will be generated
#   def Generator.generate_all(opts = { })
#     self.subclasses.each do |str|
#       str.constantize.new(app, opts.merge(:prefix => true)).generate
#     end
#   end

  def Generator.build(app, target, opts = { })
    if Generator.subclasses.member?(target.to_s)
      target.new(app, opts)
    else
      raise RuntimeError
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
mattknox-goaloc-0.4.0 lib/goaloc/generators/generator.rb
mattknox-goaloc-0.4.1 lib/goaloc/generators/generator.rb
mattknox-goaloc-0.4.2 lib/goaloc/generators/generator.rb