Class: ActivityStreams::Collection
- Defined in:
- lib/activitystreams/collection.rb
Direct Known Subclasses
Instance Method Summary collapse
Methods inherited from Base
Methods included from Validator
#to_float, #to_integer, #to_iri, #to_time, #validate_attribute!
Constructor Details
This class inherits a constructor from ActivityStreams::Base
Instance Method Details
#item_class ⇒ Object
14 15 16 |
# File 'lib/activitystreams/collection.rb', line 14 def item_class Object end |
#validate_attributes! ⇒ Object
5 6 7 8 9 10 11 12 |
# File 'lib/activitystreams/collection.rb', line 5 def validate_attributes! super if items.blank? && url.blank? raise AttrMissing.new('Either "items" or "url" is required') end to_iri :url validate_attribute! :items, item_class, :arrayed! end |