Module: Dam
- Defined in:
- lib/dam.rb,
lib/dam/stream.rb,
lib/dam/storage.rb,
lib/dam/version.rb,
lib/dam/activity.rb
Defined Under Namespace
Classes: Activity, ActivityType, Context, ParamsProxy, Storage, Stream, StreamDefinition, TemplatedStream, TypeProxy
Constant Summary
collapse
- PLACEHOLDER_PATTERN =
%r{:[^:@/-]+}
- Version =
"0.3.0"
Class Method Summary
collapse
Class Method Details
.activity(name, &block) ⇒ Object
.post(type, params = {}) ⇒ Object
13
14
15
16
17
18
19
|
# File 'lib/dam.rb', line 13
def self.post(type, params = {})
act = Dam::ActivityType.lookup(type.to_sym).apply(params)
act.post!
act
end
|
.push(activity) ⇒ Object
9
10
11
|
# File 'lib/dam.rb', line 9
def self.push(activity)
Dam::Storage.insert(activity, Dam::Stream.all.select {|stream| stream.matches? activity })
end
|
.stream(name, &block) ⇒ Object