Sha256: 1b62be10472a851ead477b6e23f7b9f968d48fb32e2de884f0a244f4229337cf

Contents?: true

Size: 344 Bytes

Versions: 4

Compression:

Stored size: 344 Bytes

Contents

require 'ripple/associations/instantiators'

module Ripple
  module Associations
    module One
      include Instantiators

      def to_a
        [self]
      end

      protected
      def instantiate_target(instantiator, attrs={})
        @target = klass.send(instantiator, attrs)
        loaded
        @target
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 3 rubygems

Version Path
wyngle-ripple-0.1.0 lib/ripple/associations/one.rb
better-ripple-1.0.0 lib/ripple/associations/one.rb
ripple-1.0.0.beta2 lib/ripple/associations/one.rb
ripple-1.0.0.beta lib/ripple/associations/one.rb