Sha256: e8f7f6d2cf4d75596aa989d7f610e145d16be82a63cfb365c3febe7a0ddbb4bc

Contents?: true

Size: 442 Bytes

Versions: 5

Compression:

Stored size: 442 Bytes

Contents

require 'ripple/associations'

module Ripple
  module Associations
    module Instantiators

      def build(attrs={})
        instantiate_target(:new, attrs)
      end

      def create(attrs={})
        instantiate_target(:create, attrs)
      end

      def create!(attrs={})
        instantiate_target(:create!, attrs)
      end

      protected
      def instantiate_target
        raise NotImplementedError
      end

    end
  end
end

Version data entries

5 entries across 5 versions & 4 rubygems

Version Path
wyngle-ripple-0.1.0 lib/ripple/associations/instantiators.rb
better-ripple-1.0.0 lib/ripple/associations/instantiators.rb
ripple-1.0.0.beta2 lib/ripple/associations/instantiators.rb
seomoz-ripple-1.0.0.pre lib/ripple/associations/instantiators.rb
ripple-1.0.0.beta lib/ripple/associations/instantiators.rb