Sha256: 60452ea2e4c16a613bd1434181e83f1a1a892005f6b661716d4f1ffede23edfc
Contents?: true
Size: 464 Bytes
Versions: 5
Compression:
Stored size: 464 Bytes
Contents
module HorizonClient class Collection include Enumerable attr_reader :node def initialize(node) @node = node @rows = @node.locate('row').map do |row| Entity.new(row) end end def build row = Ox::Element.new('row') node << row entity = Entity.new(row) @rows.push(entity) entity end def rows @rows end def each(&block) @rows.each(&block) end end end
Version data entries
5 entries across 5 versions & 1 rubygems