lib/mutest/registry.rb
def register(type, klass)
      raise RegistryError, "Invalid type registration: #{type.inspect}" unless AST::Types::ALL.include?(type)
      raise RegistryError, "Duplicate type registration: #{type.inspect}" if contents.key?(type)

      contents[type] = klass
      self
    end
# Register class for AST node class
#
# @param [Symbol] type
# @param [Class] class
#
# @return [self]
Register class for AST node class
Register class for AST node class
def register(type, klass)
      raise RegistryError, "Invalid type registration: #{type.inspect}" unless AST::Types::ALL.include?(type)
      raise RegistryError, "Duplicate type registration: #{type.inspect}" if contents.key?(type)
      contents[type] = klass
      self
    end
def register ( type , klass ) raise RegistryError , "Invalid type registration: #{type.inspect}" unless AST :: Types :: ALL . include? ( type ) raise RegistryError , "Duplicate type registration: #{type.inspect}" if contents . key? ( type ) contents [ type ] = klass self end
Register class for AST node class
Register class for AST node class
None
self
type
klass
None