class Dizby::RefinedProtocol

Attributes

regex[R]

Public Class Methods

new(regex, &block) click to toggle source
# File lib/dizby/protocol/refined.rb, line 17
def initialize(regex, &block)
  @regex = /^#{format(regex, Dizby::PROTOCOL_REGEX)}$/
  @block = block
end

Public Instance Methods

call(*args) click to toggle source
# File lib/dizby/protocol/refined.rb, line 24
def call(*args)
  @block.call(*args)
end