lib/websocket/frame/handler/base.rb in websocket-1.2.2 vs lib/websocket/frame/handler/base.rb in websocket-1.2.3
- old
+ new
@@ -1,24 +1,23 @@
module WebSocket
module Frame
module Handler
class Base
-
def initialize(frame)
@frame = frame
end
# Convert data to raw frame ready to send to client
# @return [String] Encoded frame
def encode_frame
- raise NotImplementedError
+ fail NotImplementedError
end
# Convert raw data to decoded frame
# @return [WebSocket::Frame::Incoming] Frame if found, nil otherwise
def decode_frame
- raise NotImplementedError
+ fail NotImplementedError
end
private
# Check if frame is one of control frames
@@ -32,10 +31,9 @@
# @param [Symbol] frame_type Frame type
# @return [Boolean] True if given frame type is data frame
def data_frame?(frame_type)
[:text, :binary].include?(frame_type)
end
-
end
end
end
end