Class: Dam::StreamDefinition
- Inherits:
-
Object
- Object
- Dam::StreamDefinition
- Defined in:
- lib/dam/stream.rb
Overview
provides the basis of the DSL to define a stream
Instance Method Summary collapse
- #accepts(args = {}) ⇒ Object
- #filters ⇒ Object
-
#initialize ⇒ StreamDefinition
constructor
A new instance of StreamDefinition.
- #limit(amount = nil) ⇒ Object
- #params ⇒ Object
Constructor Details
#initialize ⇒ StreamDefinition
Returns a new instance of StreamDefinition.
8 9 10 11 |
# File 'lib/dam/stream.rb', line 8 def initialize @filters = [] @limit = 10 end |
Instance Method Details
#accepts(args = {}) ⇒ Object
21 22 23 |
# File 'lib/dam/stream.rb', line 21 def accepts(args = {}) @filters << args end |
#filters ⇒ Object
17 18 19 |
# File 'lib/dam/stream.rb', line 17 def filters @filters end |
#limit(amount = nil) ⇒ Object
13 14 15 |
# File 'lib/dam/stream.rb', line 13 def limit(amount = nil) amount.nil? ? @amount : @amount = amount end |
#params ⇒ Object
25 26 27 |
# File 'lib/dam/stream.rb', line 25 def params ParamsProxy end |