Class: DStream::Simple1
Instance Method Summary collapse
- #apply(s) ⇒ Object
-
#initialize(sym, arg) ⇒ Simple1
constructor
A new instance of Simple1.
Methods inherited from Abstract
Constructor Details
#initialize(sym, arg) ⇒ Simple1
Returns a new instance of Simple1.
24 25 26 27 |
# File 'lib/d-stream.rb', line 24 def initialize(sym, arg) @sym = sym @arg = arg end |
Instance Method Details
#apply(s) ⇒ Object
29 30 31 |
# File 'lib/d-stream.rb', line 29 def apply(s) s.to_enum.lazy.__send__(@sym, @arg) end |