Module: ActivityStreams::LinksSpec
- Includes:
- Spec
- Defined in:
- lib/streams/activitystreams.rb
Instance Method Summary collapse
- #link(rel, include_object_type = false, &block) ⇒ Object
- #link_with_object_type(rel, &block) ⇒ Object
-
#missing_check(v) ⇒ Object
Require that all properties on the Links spec are link objects.
Methods included from Spec
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
Instance Method Details
#link(rel, include_object_type = false, &block) ⇒ Object
916 917 918 |
# File 'lib/streams/activitystreams.rb', line 916 def link rel, include_object_type=false, &block self[rel.to_sym] = ASObj.generate :link, !include_object_type, &block end |
#link_with_object_type(rel, &block) ⇒ Object
920 921 922 |
# File 'lib/streams/activitystreams.rb', line 920 def link_with_object_type rel, &block link rel, true, &block end |