Module: ActivityStreams::ObjectSpec
- Includes:
- Spec, Defs
- Included in:
- AVSpec, ActivitySpec, BookmarkSpec, CollectionSpec, EventSpec, Experimental::VerbSpec, FileSpec, ImageSpec, IssueSpec, LinkSpec, PermissionsSpec, PlaceSpec, RGSpec
- Defined in:
- lib/streams/activitystreams.rb
Overview
The base spec for all ASObj’s
Class Method Summary
collapse
Instance Method Summary
collapse
Methods included from Spec
#missing_check
Methods included from Spec::Defs
#def_absolute_iri, #def_boolean, #def_bound_float, #def_date_time, #def_iri, #def_non_negative_int, #def_numeric, #def_object, #def_object_array, #def_string, #def_string_array
Class Method Details
.included(other) ⇒ Object
668
669
670
671
672
673
674
675
|
# File 'lib/streams/activitystreams.rb', line 668
def self.included(other)
other.extend Defs
other.module_exec {
def self.included(o)
o.extend Defs
end
}
end
|
Instance Method Details
#attachment(m, &block) ⇒ Object
643
644
645
|
# File 'lib/streams/activitystreams.rb', line 643
def attachment m, &block
property :attachments, m, &block
end
|
#downstream_duplicate(m, &block) ⇒ Object
647
648
649
|
# File 'lib/streams/activitystreams.rb', line 647
def downstream_duplicate m, &block
property :downstream_duplicates, m, &block
end
|
#ext_vocab(sym, &block) ⇒ Object
Basic support for external vocabularies.. Developers will have to register their own spec modules for these, but we at least provide the constructor methods
659
660
661
|
# File 'lib/streams/activitystreams.rb', line 659
def ext_vocab sym, &block
self[sym] = ASObj.generate(sym,true,&block)
end
|
#upstream_duplicate(m, &block) ⇒ Object
651
652
653
|
# File 'lib/streams/activitystreams.rb', line 651
def upstream_duplicate m, &block
property :upstream_duplicates, m, &block
end
|