Module: ExistDB::Dom::ActiveRecord::NodeArray

Defined in:
lib/existdb/dom/active_record.rb

Instance Method Summary collapse

Instance Method Details

#[](*opts) ⇒ Object



11
12
13
14
15
16
17
18
# File 'lib/existdb/dom/active_record.rb', line 11

def [](*opts)
    raw = super
    if raw.is_a?(Array) then
        return raw.map{|obj| convert(obj) }
    else
        return convert(raw)
    end
end

#eachObject



20
21
22
23
24
# File 'lib/existdb/dom/active_record.rb', line 20

def each
    super do |obj|
        yield convert(obj)
    end
end