Sha256: dcae4cbb86278c24033ebd7f46c14c7e38947c1a70ce2837a6d9c8990070e298
Contents?: true
Size: 374 Bytes
Versions: 1
Compression:
Stored size: 374 Bytes
Contents
module Feedlr # When the response is of Array type, # it creates an array of Feedlr::Base or plain types elements class Collection < Array # Initializer # @param [Array] data # @return [Feedlr::Collection] def initialize(data) super([]) data.each do |e| self.<<(e.is_a?(Hash) ? Feedlr::Base.new(e) : e) end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
feedlr-0.1.0 | lib/feedlr/collection.rb |