Class: Syslog::Stream
- Inherits:
-
Object
- Object
- Syslog::Stream
- Defined in:
- lib/syslog/stream.rb,
lib/syslog/stream/version.rb,
lib/syslog/stream/octet_counting_framing.rb
Defined Under Namespace
Classes: OctetCountingFraming
Constant Summary collapse
- VERSION =
"0.1.0"
Instance Method Summary collapse
-
#initialize(framing, options = {}) ⇒ Stream
constructor
A new instance of Stream.
- #messages ⇒ Object
Constructor Details
#initialize(framing, options = {}) ⇒ Stream
Returns a new instance of Stream.
6 7 8 9 |
# File 'lib/syslog/stream.rb', line 6 def initialize(framing, ={}) @framing = framing @parser = .fetch(:parser) { Syslog::Parser.new } end |
Instance Method Details
#messages ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/syslog/stream.rb', line 11 def return to_enum(__callee__) unless block_given? @framing. do || yield @parser.parse() end end |