Module: ActivityStreams
Defined Under Namespace
Modules: AVSpec, ActivitySpec, AddressSpec, BinarySpec, BookmarkSpec, CollectionSpec, EventSpec, Experimental, FileSpec, ImageSpec, IssueSpec, LinkSpec, LinksSpec, Makers, Matchers, MediaLinkSpec, MoodSpec, ObjectSpec, PermissionsSpec, PlaceSpec, PositionSpec, RGSpec, Spec, TaskSpec Classes: ASObj
Constant Summary collapse
- SPECS =
Collect the various Specs and map to their respective object types
{ nil => ObjectSpec, :activity => ActivitySpec, :media_link => MediaLinkSpec, :mood => MoodSpec, :address => AddressSpec, :place => PlaceSpec, :position => PositionSpec, :collection => CollectionSpec, :audio => AVSpec, :video => AVSpec, :binary => BinarySpec, :file => FileSpec, :event => EventSpec, :issue => IssueSpec, :permission => PermissionsSpec, :role => RGSpec, :group => RGSpec, :task => TaskSpec, :product => ImageSpec, :image => ImageSpec, :link => LinkSpec, :links => LinksSpec }
Class Method Summary collapse
-
.add_spec(sym, spec) ⇒ Object
override or add a new spec…
- .checker(&block) ⇒ Object
-
.object_spec(*specs, &block) ⇒ Object
create a new Spec module based on ObjectSpec.
-
.spec(*specs, &block) ⇒ Object
create a new Spec module.
Methods included from Makers
#activity, #collection, #copy_from, #media_link, #now, #object
Methods included from Matchers
is_absolute_iri?, is_lang_tag?, is_mime_type?, is_token?, is_verb?
Class Method Details
.add_spec(sym, spec) ⇒ Object
override or add a new spec… be careful here.. the existing spec definitions can be overridden
953 954 955 |
# File 'lib/streams/activitystreams.rb', line 953 def add_spec sym, spec SPECS[sym] = spec end |
.checker(&block) ⇒ Object
187 188 189 |
# File 'lib/streams/activitystreams.rb', line 187 def checker &block Matchers.checker &block end |
.object_spec(*specs, &block) ⇒ Object
create a new Spec module based on ObjectSpec
965 966 967 |
# File 'lib/streams/activitystreams.rb', line 965 def object_spec *specs, &block spec ObjectSpec, *specs, &block end |