class Klaro::Client::Collection
Public Class Methods
dress_one(item)
click to toggle source
# File lib/klaro/client/resource.rb, line 44 def dress_one(item) @item_class.dress(item, @client) end
item(clazz)
click to toggle source
# File lib/klaro/client/resource.rb, line 40 def item(clazz) @item_class = clazz end
new(items, client)
click to toggle source
# File lib/klaro/client/resource.rb, line 28 def initialize(items, client) @items = items.map{|i| self.class.dress_one(i) } @client = client end
Also aliased as: dress
Public Instance Methods
each(*args, &bl)
click to toggle source
# File lib/klaro/client/resource.rb, line 33 def each(*args, &bl) @items.each(*args, &bl) end