class Redk::Smdr::Client
Public Class Methods
new(host, port=1752)
click to toggle source
# File lib/redk/smdr/client.rb, line 6 def initialize(host, port=1752) @host = host @port = port end
Public Instance Methods
read() { |match(line, level_2), line| ... }
click to toggle source
# File lib/redk/smdr/client.rb, line 11 def read socket = TCPSocket.open(@host, @port) begin while line = socket.gets yield Redk::Smdr::Matcher.match(line, Redk::Smdr::Matcher::Extended.level_2), line end ensure socket.close end end