Module: Ripple::Associations::Many

Includes:
Instantiators
Included in:
ManyEmbeddedProxy, ManyLinkedProxy, ManyReferenceProxy, ManyStoredKeyProxy
Defined in:
lib/ripple/associations/many.rb

Instance Method Summary collapse

Methods included from Instantiators

#build, #create, #create!

Instance Method Details

#<<(value) ⇒ Object Also known as: push, concat

Raises:

  • (NotImplementedError)


23
24
25
# File 'lib/ripple/associations/many.rb', line 23

def <<(value)
  raise NotImplementedError
end

#countObject



13
14
15
16
# File 'lib/ripple/associations/many.rb', line 13

def count
  load_target
  target.size
end

#resetObject



18
19
20
21
# File 'lib/ripple/associations/many.rb', line 18

def reset
  super
  @target = []
end

#to_aryObject



8
9
10
11
# File 'lib/ripple/associations/many.rb', line 8

def to_ary
  load_target
  Array === target ? target.to_ary : Array.wrap(target)
end