Sha256: ac3f8db6f9aa451f95ee0d61925f74056442d79138892ca1a373ac6978a706d4

Contents?: true

Size: 453 Bytes

Versions: 1

Compression:

Stored size: 453 Bytes

Contents

require 'active_support/inflector'

class Blazing::Recipe

  attr_reader :options

  def initialize(options = {})
    @options = options
  end

  class << self

    def init_by_name(name, options = {})
      "Blazing::Recipe::#{name.to_s.camelize}".constantize.new(options)
    end

    def list
      descendants = []
      ObjectSpace.each_object(Class) do |k|
        descendants.unshift k if k < self
      end
      descendants
    end

  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
blazing-0.1.0.alpha4 lib/blazing/recipe.rb