Module: Ripple::Associations::Many

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

Instance Method Summary (collapse)

Methods included from Instantiators

#build, #create, #create!

Instance Method Details

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

Raises:

  • (NotImplementedError)


37
38
39
# File 'ripple/lib/ripple/associations/many.rb', line 37

def <<(value)
  raise NotImplementedError
end

- (Object) count



27
28
29
30
# File 'ripple/lib/ripple/associations/many.rb', line 27

def count
  load_target
  target.size
end

- (Object) reset



32
33
34
35
# File 'ripple/lib/ripple/associations/many.rb', line 32

def reset
  super
  @target = []
end

- (Object) to_ary



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

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