Module: Ripple::Associations::Many
Instance Method Summary
collapse
#build, #create, #create!
Instance Method Details
#<<(value) ⇒ Object
Also known as:
push, concat
23
24
25
|
# File 'lib/ripple/associations/many.rb', line 23
def <<(value)
raise NotImplementedError
end
|
13
14
15
16
|
# File 'lib/ripple/associations/many.rb', line 13
def count
load_target
target.size
end
|
18
19
20
21
|
# File 'lib/ripple/associations/many.rb', line 18
def reset
super
@target = []
end
|
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
|