Replicator

Replicator is a class registry and factory.

Installation

  1. Add the dependency to your shard.yml:

    dependencies:
      replicator:
        github: first-try-software/replicator
  2. Run shards install

Usage

require "replicator"

abstract class Starship
  extend Replicator::Replicable
end

class Enterprise < Starship
  replicates :galaxy
end

class Cerritos < Starship
  replicates :galaxy
end

Starship.replicate(:galaxy)  # => [#<Enterprise:0x1099ddd60>, #<Cerritos:0x1099ddd70>] : Array(Starship)

Roadmap

Replicator is ready to use in it's current state. The interfaces are unlikey to change. But, there will be new features added per our roadmap:

Contributing

  1. Fork it (https://github.com/first-try-software/replicator/fork)
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors