class CloudConvert::Collection
Attributes
links[R]
meta[R]
Public Class Methods
new(items = [], links = {}, meta = {})
click to toggle source
Calls superclass method
# File lib/cloudconvert/collection.rb, line 5 def initialize(items = [], links = {}, meta = {}) super(items) @links = links @meta = meta end
Public Instance Methods
where(attrs)
click to toggle source
# File lib/cloudconvert/collection.rb, line 11 def where(attrs) self.class.new select { |item| attrs.map { |k, v| item.send(k) == v ? true : nil }.compact.length == attrs.length } end